I need help for a timer

Im trying to make a game that involves a timer and in that time you have to get as much score as you can. I have made the score and it works, but i am having some problems with the timer. Can anybody tell me how to make a timer???
My timer is basically text like this:
Time: 60 (seconds)
But i don’t know how to make the timer go down.

Any help would be appreciated.

try making a variable named timer and set it to 60 seconds. Then use a while function.

also, use the set text command

In what script do i make the variable???

everysecond1-5-2021_3-12-42PM.wick (1.7 KB)

What it does is that in update there’s a project.second, it goes up every tick to 1, if it reaches 20, project.secondpassed -= 1, which means that it’ll go down by 1 second, and it resets project.second.
Also, there’s a setText that makes secondtext’s text project.secondpassed.
(There are 20 ticks in a second, that’s why when it reaches 20 it resets.)
(Yeahhh, i googled that.)

put it in default

everysecond1-5-2021_3-12-42PM.wick (1.7 KB)
This one goes a little bit faster and when it reaches 0 it stops and it shows a “You’ve runned out of time!” text.