Help, this script doesn't work
function onTouch(Part)
local Character = Part.Parent
local Humanoid = Character:FindFirstChild("Humanoid")
if Humanoid then
local Parts = Character:GetChildren()
for i = 1, #Parts do
if Parts[i].className == "Part" then
Parts.Anchored = true
end
end
end
end
script.Parent.Touched:connect(onTouch) |