#Math

12 messages · Page 1 of 1 (latest)

unique crater
#

you need to convert numbers to string

frosty path
#

yeah because you are trying to add a number to a string bruh

#

do this instead

#
while true do 
    playergui.CoinsGui.Frame.TextLabel.Text = x + 1
    wait(1)
end
#

i think that would work

#

if there is no string in the text just number

#

you could check if its a number using typeof()

#
if typeof(textbox.Text) == "number" then
   --do something
end
``` example ^^
unique crater
#
local x = 0

while true do
  x += 1
  playerGui.CoinsGui.Frame.TextLabel.Text = tostring(x)
  wait(1)
end
night needle
#

Technically, you can perform arithmetic on a string, but that string has to have a number representation

#

;compile

local number = "1" 

number = number + 1

print(number)
print(type(number)) -- The string gets coerced to a number, but is cast back to a string when assigned to TextLabel.Text