SHARE
TWEET

Untitled

a guest May 22nd, 2019 56 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. game.Workspace.NexusVRCharacterModel = game.ServerScriptStorage
  37.  
  38. if game:GetService("Workspace").FilteringEnabled then
  39.     local Players = game:GetService("Players")
  40.     local UpdateCFramesForCharacter = Instance.new("RemoteEvent")
  41.     UpdateCFramesForCharacter.Name = "NexusVRCharacter_Replicator"
  42.     UpdateCFramesForCharacter.Parent = game:GetService("ReplicatedStorage")
  43.    
  44.     UpdateCFramesForCharacter.OnServerEvent:Connect(function(Player,HeadCF,LeftControllerCF,RightControllerCF,LeftFootCF,RightFootCF)
  45.         if Player and HeadCF and LeftControllerCF and RightControllerCF and LeftFootCF and RightFootCF then
  46.             for _,OtherPlayer in pairs(Players:GetPlayers()) do
  47.                 if OtherPlayer ~= Player then
  48.                     UpdateCFramesForCharacter:FireClient(OtherPlayer,Player,HeadCF,LeftControllerCF,RightControllerCF,LeftFootCF,RightFootCF)
  49.                 end        
  50.             end
  51.         end
  52.     end)
  53. end
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