I am trying to make a fishing simulator and let the code comments speak for themselves:
local debounce = false
local whoClicked = script.Parent.Parent.Parent
local starterRod = whoClicked.Backpack.Rod
starterRod.Activated:Connect(function()
if debounce == false then
--I need an if distance from the part is <30 then
debounce = true
local Rope = Instance.new("RopeConstraint", workspace)
Rope.Attachment0 = starterRod.Handle.Attachment0
Rope.Attachment1 = game.Workspace.Rope2.Attachment1
Rope.Visible = true
Rope.Length = 30
starterRod.Unequipped:Connect(function()
Rope:Destroy()
debounce = false
end)
wait(10)
Rope:Destroy()
wait(2)
debounce = false
end
--end (end the if)
end)

2 comments
Tysm man! it really helped a ton
Np, glad I could help!