i made a script that welds the hrp to a part when the part has been touched. it works, but if i delete the weld with the explorer, when i press the part nothing happends. why?
script:
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local w = Instance.new("Weld")
w.Part0 = script.Parent
w.Part1 = hit.Parent.HumanoidRootPart
w.C0 = script.Parent.CFrame:Inverse()
w.C1 = hit.Parent.HumanoidRootPart.CFrame:Inverse()
w.Parent = script.Parent
end
end)
thx
