Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to check if text is lower than 110 seconds?

Asked by 1 year ago

I have a text label that displays a timer and I would like to check whether the timer has reached below 110 seconds this is my script to play a tween if the timer is below 110.

if TimerLabel.Text < "110" then
tween:Play()
else
print("timer is not under 110 seconds")
end

1 answer

Log in to vote
1
Answered by
pwx 1581 Moderation Voter
1 year ago
if typeof(tonumber(TimerLabel.Text)) == 'Number' then
    if tonumber(TimerLabel.Text) < 110 then
        tween:Play()
    else
        print('timer is not under 110 seconds')
    end
end
0
thanks for the help plf4wef4ef 4 — 1y
0
yk you can just do `if tonumber(TimerLabel.Text) then` instead of `if typeof(tonumber(TimerLabel.Text)) == 'Number' then` T3_MasterGamer 2189 — 1y
Ad

Answer this question