Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. local NexusVRCharacter = script:WaitForChild("NexusVRCharacter")
  2. local Configuration = script:WaitForChild("Configuration")
  3. Configuration.Parent = NexusVRCharacter
  4.  
  5. for _,Player in pairs(game.Players:GetPlayers()) do
  6. spawn(function()
  7. local PlayerScripts = Player:FindFirstChild("PlayerScripts")
  8. NexusVRCharacter:Clone().Parent = (PlayerScripts or Player:WaitForChild("PlayerGui",120))
  9. end)
  10. end
  11. NexusVRCharacter.Parent = game:GetService("StarterPlayer"):WaitForChild("StarterPlayerScripts")
  12.  
  13. if game:GetService("Workspace").FilteringEnabled then
  14. local Players = game:GetService("Players")
  15. local UpdateCFramesForCharacter = Instance.new("RemoteEvent")
  16. UpdateCFramesForCharacter.Name = "NexusVRCharacter_Replicator"
  17. UpdateCFramesForCharacter.Parent = game:GetService("ReplicatedStorage")
  18.  
  19. UpdateCFramesForCharacter.OnServerEvent:Connect(function(Player,HeadCF,LeftControllerCF,RightControllerCF,LeftFootCF,RightFootCF)
  20. if Player and HeadCF and LeftControllerCF and RightControllerCF and LeftFootCF and RightFootCF then
  21. for _,OtherPlayer in pairs(Players:GetPlayers()) do
  22. if OtherPlayer ~= Player then
  23. UpdateCFramesForCharacter:FireClient(OtherPlayer,Player,HeadCF,LeftControllerCF,RightControllerCF,LeftFootCF,RightFootCF)
  24. end
  25. end
  26. end
  27. end)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement