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

How do I work my +1 script?

Asked by
Zelnus 30
9 years ago

So I am making a little surface gui with 2 names on it and when somebody clicks a name it adds 1 to the value and shows up on a different gui. My script isnt working:

script.Parent.MouseButton1Click:connect(function()
    game.Workspace.Screen.SurfaceGui.Frame.FirstNominee2.Value.Value = +1
    script.Parent.Parent.Visible = false
    wait(8)
    script.Parent.Parent.Visible = true
end)

1 answer

Log in to vote
0
Answered by 9 years ago

You cannot have the value set to +1, you will have to repeat the value and add 1 onto it:

game.Workspace.Screen.SurfaceGui.Frame.FirstNominee2.Value.Value = game.Workspace.Screen.SurfaceGui.Frame.FirstNominee2.Value.Value +1
0
That didn't work Zelnus 30 — 9y
0
I can only guess that you've misspelled something, or typed it in wrong. darkelementallord 686 — 9y
Ad

Answer this question