Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trouble with this changed function in a localscript?

Asked by 8 years ago

local lplayer = game.Players.LocalPlayer local RS = game:GetService("RunService") playerparts = {lplayer.Character.Head, lplayer.Character.Torso, lplayer.Character.HumanoidRootPart} RS.Stepped:connect(function() repeat wait() until lplayer:FindFirstChild("Torso") and lplayer:FindFirstChild("Head") and lplayer:FindFirstChild("HumanoidRootPart") lplayer.Character.Changed:connect(function(Property) if Property == "CanCollide" then for i,v in pairs(playerparts) do v.CanCollide = false end end end) end)

It doesn't change the head or torso's CanCollide to false, no matter what I try. Any help on this ?

Answer this question