This script is currently removing the HumanoidRootPart and also destroying various parts of the character as on touched, but what I need it to do is to just remove the HumanoidRootPart. Please help!
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("HumanoidRootPart") then hit:Destroy() end end)
Thanks in advance.
Line 3 is where it's all going wrong. In line 3, you are destroying the thing that touched the part, taht's not what you want.
script.Parent.touched:connect(function(hit) --Something touches the brick Part = hit.Parent:FindFirstChild("HumanoidRootPart") --Finds the RootPart if Part then Part:Destroy() end --If what you are looking is there, then destroy it. end)