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

TextButton stopped working for no reason?

Asked by 10 years ago

the other day i made a button that is supposed to change the text of something, it worked but now it doesnt

here is the script

ifActive = script.Parent.IfActive.Value
activeVal = script.Parent.Parent.ActiveVal.Value
script.Parent.MouseButton1Click:connect(function()
    activeVal = 1

    while activeVal == 1 do
    script.Parent.SpotsVal.Value = script.Parent.Parent.Parent.Parent.Parent.Spots.Frame.TextLabel.SpotsVal.Value
    asd = script.Parent.SpotsVal.Value
    script.Parent.Parent.Parent.Desc.Text = ("Find the 6 No skating signs around the map")
    if asd == 6 then
        script.Parent.Parent.Parent.Progress.Text = ("Completed!")
        script.Parent.Parent.Parent.Progress.TextColor3 = Color3.new(0, 255, 0)
    end
    if asd ~= 6 then

    script.Parent.Parent.Parent.Progress.Text = (asd.." No skating signs found out of 6")
    end

    wait (1)
    end



end)

tell me if there is something wrong with the script

1 answer

Log in to vote
1
Answered by
HexC3D 830 Moderation Voter
10 years ago
ifActive = script.Parent.IfActive.Value
activeVal = script.Parent.Parent.ActiveVal.Value
script.Parent.MouseButton1Click:connect(function()
    activeVal = 1

    repeat wait() unti activeVal ~= 1 -- Or you can do if activeval == 1  then and so on
    script.Parent.SpotsVal.Value = script.Parent.Parent.Parent.Parent.Parent.Spots.Frame.TextLabel.SpotsVal.Value
    asd = script.Parent.SpotsVal.Value
    script.Parent.Parent.Parent.Desc.Text = "Find the 6 No skating signs around the map"
    if asd == 6 then
        script.Parent.Parent.Parent.Progress.Text = ("Completed!")
        script.Parent.Parent.Parent.Progress.TextColor3 = Color3.new(0, 255, 0)
    end
    if asd ~= 6 then

    script.Parent.Parent.Parent.Progress.Text = asd.." No skating signs found out of 6"
    end

    wait (1)
    end



end)


0
Thanks!, it finally worked jorge5879 5 — 10y
Ad

Answer this question