Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a text box that changes a fishing rod's "Rope Constraint" length? (SOLVED)

I have tried to make a script that works in a GUI text box but I cannot seem to do it because I just recently started coding. Please tell me where to put the new script and here is a script I tried to code. Edit: The "RopeConstraint" is located in the tool and the default length is 8 and please tell me what type of script to put it in.

function type()
	local player = game.Players.LocalPlayer
local target
wait(Random)
game.Workspace.Localplayer.FishingRod.RopeConstraint.Length = Parent.Text.Value
end

2 comments

0

If Parent.Text.Value isn't a numbervalue but a textbox you should use Parent.Text.Text

0

Thanks Derzett. I will try that out.

1 answer

Hi everyone! I have just made a solution to this problem. (It works with a button now, not a text box.)

script.Parent.Activated:Connect(function()
	if script.Parent.Text == "Retract" then
		script.Parent.Text = "Fish"
		game.Players.LocalPlayer.Character.FishingRod.RopeConstraint.Length = 1 
	else
		script.Parent.Text = "Retract"
		game.Players.LocalPlayer.Character.FishingRod.RopeConstraint.Length = 15
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.