I am trying to make a rope constraint change length using a gui that appears when the tool is held in the lower right hand corner of the screen. I've already made the gui appear and disappear, but I need to figure out how to make the length of the rope change when the player types a number into the textbox. To do this, I need to know how to detect the number and use it as a variable that will serve to change the length of the rope. Any help is appreciated, thanks!
repeat wait() until script.Parent.Parent.Name ~= "Backpack" local char = script.Parent.Parent local player = game.Players:GetPlayerFromCharacter(char) while wait() do script.Parent.Money.RopeConstraint.Length = player.PlayerGui.BaitLengthGui.Frame.Textbox.Text -- This is where I am having issues end
try this
repeat wait() until script.Parent.Parent.Name ~= "Backpack" local char = script.Parent.Parent local player = game.Players:GetPlayerFromCharacter(char) while wait() do if tonumber(player.PlayerGui.BaitLengthGui.Frame.TextBox.Text) then script.Parent.Money.RopeConstraint.Length = tonumber(player.PlayerGui.BaitLengthGui.Frame.Textbox.Text) end end