Advertisement
Navarone19_CH

NoCollisionPlayer script

May 18th, 2020
2,854
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. script.Parent = game:GetService("ServerScriptService")
  2.  
  3. local PhysService = game:GetService("PhysicsService")
  4. local PlayerGroup = PhysService:CreateCollisionGroup("p")
  5. PhysService:CollisionGroupSetCollidable("p","p",false)
  6.  
  7. function NoCollide(model)
  8. for k,v in pairs(model:GetChildren()) do
  9. if v:IsA"BasePart" then
  10. PhysService:SetPartCollisionGroup(v,"p")
  11. end
  12. end
  13. end
  14.  
  15. game:GetService("Players").PlayerAdded:connect(function(player)
  16. player.CharacterAdded:connect(function(char)
  17. char:WaitForChild("HumanoidRootPart")
  18. char:WaitForChild("Head")
  19. char:WaitForChild("Humanoid")
  20. wait(0.1)
  21. NoCollide(char)
  22. end)
  23.  
  24. if player.Character then
  25. NoCollide(player.Character)
  26. end
  27. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement