my rope is bugging, The script can’t disable the rope constraint
local flyControls = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("FlyControls")
if not flyControls then
warn("FlyControls not found!")
return
end
local rope = script.Parent
if not rope then
warn("RopeConstraint not found in Bed!")
return
end
task.spawn(function()
while true do
if flyControls.f.Value == true then
script.Parent.Enabled = false
elseif flyControls.f.Value == false then
script.Parent.Enabled = true
end
task.wait(0.1)
end
end)
Hey, try this out. Make sure your script is on the server and check if the RopeConstraint is properly referenced. Here’s an example:
local flyControls = game.ReplicatedStorage:WaitForChild("FlyControls")
task.spawn(function()
while true do
if flyControls.f.Value then
rope.Enabled = false
else
rope.Enabled = true
end
wait(0.1)
end
end)