As soon a player joins, I want to add them to a collision group. How can I do this?
You would use the CharacterAdded
Evetnrt to wait for the Player’s Character they they spawn or Respawn, and iterate through their Limbs to set there CollisionGroup
Player.CharacterAdded:Connect(function(char)
task.wait(1) -- just so there isnt errors
local Array = char:GetChildren() -- Gets Children within the Character
for i,v in Array do -- Iterates through Character
if v:IsA("BasePart") then -- if Item is a Part
v.CollisionGroup = "YourCollisionGroup" -- Set Collision Group
end
end
end)
Accessories
are already CanCollide
false
so you don’t have to set a CollisionGroup
to them
3 Likes
Perfect. Thank you so much (char limit)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.