Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make the player's body parts collidable?

This is making my head itch. I try to make the whole body collidable, but there's no effect. I also tried the loop to do that. Still no effect. Is there any way to make some parts collidable?

1 answer

That's odd. It should be working as long as you set the CanCollide value to true on all the player's limbs. Try using this script, it will loop through the character's children and make them collidable once the player joins or respawns.

game.Players.PlayerAdded:connect(function(plyr) --Player joined the game
	plyr.CharacterAdded:connect(function(char) --The character loaded/respawned
		for i,v in pairs(char:GetChildren()) do --Gets all the children in the character
			if v:IsA('BasePart') then --If the Instance is a part then
				v.CanCollide = true --Make it collidable
			end
		end
	end)
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.