local atrib = game.StarterGUI.PlayGUI.Frame.Attributes.Frame.Attribute.TextButton this isn't the whole script but bits of it if attrib.Text == 1 and then i don't know how to say 1 and higher in code and one more thing how do i change the color of a frame or text button
Not sure why you accepted the other answer even though it didn't answer your question.
To check whether a variable is higher than or equal to 1 you use >=
and to turn a string into a number you use tonumber()
In the if statement I use tonumber(attrib.Text)
twice; first, to make sure it is actually a number then the second, compares it only when it's a number.
local attrib = {Text = "5"} local function CheckNumber() if tonumber(attrib.Text) and tonumber(attrib.Text) >= 1 then print("Yes, it is 1 or greater.") else print("No, it is less than 1 or not a number") end end CheckNumber() attrib.Text = "0" CheckNumber() attrib.Text = "GSFDgs4545" CheckNumber()
Read more about:
The difference between a StringValue and a NumberValue is that, a StringValue's value can be set to a text such as "Hello". While, a NumberValue's value can only be set to numbers.