Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't this script run more than once despite the loop?

Asked by 4 years ago

The last time I asked this question I phrased it improperly, so here is a better description of my problem.

This script is intended to make a rope constraint change in length to the number inputted into a small gui in the corner of the screen. When you input a number, the property clearly changes, but the rope length always changes to whatever the number in the textbox was first. Is there any reason that the script isn't detecting this changes? If so, what can I do?

repeat wait() until script.Parent.Parent.Name ~= "Backpack"
local char = script.Parent.Parent
local player = game.Players:GetPlayerFromCharacter(char)

while true do
    local str = ""..player.PlayerGui.BaitLengthGui.Frame.TextBox.Text..""
    if tonumber(str) then
        script.Parent.Money.RopeConstraint.Length = tonumber(str)
        wait()
    end
end
0
Is it server sided or client sided. antoniorigo4 117 — 4y
0
Server ZeroNoey 19 — 4y

Answer this question