Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
while wait() do
print'd'
local Body = Player.Character:GetChildren()
Body.CanCollide = false
end
end)
This should work. The Head and Torso of a Player are not the only parts, but instead of just naming every part, (i.e. Right Arm, Left Arm ect...) just use the GetChildren() Function. If this doesn't work, use this code:
Player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
while wait() do
print'd'
Player.Character.Torso.CanCollide = false
Player.Character.Head.CanCollide = false
Player.Character["Right Arm"].CanCollide = false
Player.Character["Left Arm"].CanCollide = false
Player.Character["Right Leg"].CanCollide = false
Player.Character["Left Leg"].CanCollide = false
end
end)
4 comments
Wouldn't it be easier to make it so colliding into something you just move on to the other side of the 'wall'?
This code looks right
Well there is some other code maybe it is implemented into roblox. But the other code is making it true every .0000000000000000000000000000000000000000000000000000000001 second it seems.
Oh, you might have to make a custom character then