Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local PhysicsService = game:GetService("PhysicsService")
- local Players = game:GetService("Players")
- PhysicsService:RegisterCollisionGroup("Characters")
- PhysicsService:CollisionGroupSetCollidable("Characters", "Characters", false)
- Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function(Character)
- for _, Part in pairs(Character:GetDescendants()) do
- if Part:IsA("BasePart") then
- Part.CollisionGroup = "Characters"
- end
- end
- Character.DescendantAdded:Connect(function(Part)
- if Part:IsA("BasePart") then
- Part.CollisionGroup = "Characters"
- end
- end)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment