I'm having trouble adding an amount to my numbervalue if another numbervalue == 1.
v = script.Parent function onclick() if script.Parent.Parent.Parent.Parent.StarterGui.ScreenGui.ALL1.Correct.Value == 1 then v.Value = (v.Value + 20) print ("Added 20!") end end script.Parent.Parent.Parent.Parent.StarterGui.ScreenGui.SUBMIT.TextButton.MouseButton1Click(onclick)
You were targeting startergui instead of playergui you might understand with the right version of the script
function onclick() if script.Parent.ALL1.Correct.Value == 1 then v.Value = (v.Value + 20) print ("Added 20!") end end script.Parent.SUBMIT.TextButton.MouseButton1Click(onclick) --you can also use MouseButton1Down