Advertisement
lemonfarts276

Roblox Studio Player Collisions Off Script

Apr 15th, 2020
3,142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. New turn off player collisions script in Roblox Studio:
  2.  
  3. local PhysicsService = game:GetService("PhysicsService")
  4. PhysicsService:CreateCollisionGroup("Players")
  5.  
  6. PhysicsService:CollisionGroupSetCollidable("Players", "Players", false)
  7.  
  8.  game.Players.PlayerAdded:Connect(function(plr)
  9.   plr.CharacterAdded:Connect(function(char)
  10.    repeat wait(1) until char:WaitForChild("Humanoid")
  11.    
  12.    for _, characterPart in pairs(char:GetChildren()) do
  13.     if characterPart:IsA("BasePart") then
  14.        PhysicsService:SetPartCollisionGroup(characterPart, "Players")
  15.     end
  16.    end
  17.   end)
  18.  end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement