local rope = target:FindFirstChildWhichIsA('RopeConstraint')
rope.WinchTarget = 0
local connection
connection = rope:GetPropertyChangedSignal('Length'):Connect(function()
if rope.Length < 0.05 then
connection:Disconnect()
target:Destroy()
end
end)
I don’t get why this is happening because it doesn’t crash when I try using print() instead of target:Destroy().
local rope = target:FindFirstChildWhichIsA('RopeConstraint')
if rope then
rope.WinchTarget = 0
local connection
local disconnected = false
connection = rope:GetPropertyChangedSignal('Length'):Connect(function()
if disconnected then
return
end
if rope.Length < 0.05 then
disconnected = true
connection:Disconnect()
target:Destroy()
end
end)
end