So I'm making a GUI that when you click it, the number in the GUI will increase by 1

But, the problem is that the number is not increasing at all and it stays at 0

It does print "up" when I click it though

Anything to help?


Extra info:

I'm using a NumberValue

This is also inside a local script

FirstCode = script.Parent.Code1
Code1Num = script.Parent.Code1V

FirstCode.Text = Code1Num.Value

FirstCode.MouseButton1Click:Connect(function()
	print("up")
	Code1Num.Value = Code1Num.Value + 1
end)

4 comments

0

TextLabel?

0

It is a TextButton

0

move line 4 into the function

0

Thanks for the fix