SHARE
TWEET

Untitled

a guest May 22nd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.      __        __  _______  __    __  __   __  ________
  3.     /  \      / / / _____/  \ \  / /  \ \  \ \ \  _____\
  4.    / /\ \    / / / /____     \ \/ /    \ \  \ \ \ \_____
  5.   / /  \ \  / / / _____/     / /\ \     \ \  \ \ \_____ \
  6.  / /    \ \/ / / /____      / /  \ \     \ \__\ \  ____\ \
  7. /_/      \__/ /______/     /_/    \_\     \______\ \______\
  8.  
  9. Nexus VR Character Model, by TheNexusAvenger
  10.  
  11. File: NexusVRCharacterModel.lua
  12. Author: TheNexusAvenger
  13. Date: March 11th 2018
  14.  
  15. KNOWN INCOMPATABILITIES:
  16. - Animations can't be played (automatically stopped; messes up the joints)
  17. - Changes to Motor6Ds may be overriden, mainly C0 and C1
  18. - Velocities of parts on character will always read 0,0,0
  19. - Forces on character will always read 0
  20. - Characters do not interact with seats
  21. - Tools may not work as expected due to full range of motion and Touched behavior with head anchored
  22. ]]
  23.  
  24. local NexusVRCharacter = script:WaitForChild("NexusVRCharacter")
  25. local Configuration = script:WaitForChild("Configuration")
  26. Configuration.Parent = NexusVRCharacter
  27.  
  28. for _,Player in pairs(game.Players:GetPlayers()) do
  29.     spawn(function()
  30.         local PlayerScripts = Player:FindFirstChild("PlayerScripts")
  31.         NexusVRCharacter:Clone().Parent = (PlayerScripts or Player:WaitForChild("PlayerGui",120))
  32.     end)
  33. end
  34. NexusVRCharacter.Parent = game:GetService("StarterPlayer"):WaitForChild("StarterPlayerScripts")
  35.  
  36. if game:GetService("Workspace").FilteringEnabled then
  37.     local Players = game:GetService("Players")
  38.     local UpdateCFramesForCharacter = Instance.new("RemoteEvent")
  39.     UpdateCFramesForCharacter.Name = "NexusVRCharacter_Replicator"
  40.     UpdateCFramesForCharacter.Parent = game:GetService("ReplicatedStorage")
  41.    
  42.     UpdateCFramesForCharacter.OnServerEvent:Connect(function(Player,HeadCF,LeftControllerCF,RightControllerCF,LeftFootCF,RightFootCF)
  43.         if Player and HeadCF and LeftControllerCF and RightControllerCF and LeftFootCF and RightFootCF then
  44.             for _,OtherPlayer in pairs(Players:GetPlayers()) do
  45.                 if OtherPlayer ~= Player then
  46.                     UpdateCFramesForCharacter:FireClient(OtherPlayer,Player,HeadCF,LeftControllerCF,RightControllerCF,LeftFootCF,RightFootCF)
  47.                 end        
  48.             end
  49.         end
  50.     end)
  51. end
  52.  
  53. game.Workspace.NexusVRCharacterModel = game.ServerScriptStorage
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top