How would I turn a player's Character cancollide off?

I am trying to make my character’s parts can collide off but it doesn’t work. I don’t know what the problem is. There isn’t any error in the output. How can I fix this?

Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:Connect(function(char)
		for _, v in pairs(char:GetChildren()) do
			if v:IsA("BasePart") then
				v.CanCollide = false
			end	
		end		
	end)
end)
3 Likes

Well the easiest way would be to just turn CanCollide off on the part instead of on the character, but to prevent character on character collision, you’d need to use collision groups.

4 Likes