I used this code to compare numbers on a textButton with a number
but I got this error and I don’t understand why…
, thanks
I used this code to compare numbers on a textButton with a number
but I got this error and I don’t understand why…
, thanks
because you are comparing a number, to a value that is nil, show that line of code please
Can you show me the script please?
Your text seems to be nil, or it is just a string. Can you define what exactly is written in the textlabel. Alternatively, if you are creating a number for the textlabels text you can just compare the actual number instead of using the text of the text label.
oh on the textButton it’s number.
I convert number to string first and then do textButton.Text = tostring(the number)
EDIT: I didn’t store it in an intvalue or anything like that
Im confused… why arent you just comparing the number then? Also you do not have to use tostring for a number on a textlabel. Could you show me a explorer photo of the text label and tell me what exactly is the number?
this one
I will afk a few minutes.ฺฺฺฺฺฺฺฺฺฺฺ
Sorry for the late reply, was off a bit. Where do you change the number of the textlabel? Also with explorer i didnt mean the gameplay, i just wanted to know where you are defining the number as an instance.
oh sorry for late reply
I might be reading this tommorow
You should, cause it looks like you buy something with the button, the server should record what price it is in a NumberValue or IntValue, and when the client detects a click, send a RemoteEvent to the server with the type of upgrade, the server from there can validate the purchase and go through with it.