What script should this be for my 4 hour timer? & What is the script?

Hello everybody, I wanted to make this topic cause I am working on a new project & I wanted to see how it will turn out, so please help me if you can.

  1. What do you want to achieve? I want to become the best roblox developer I can be.

  2. **What is the issue?**The issue is that I have been talking to many people if they know how to do this but some of them dont - image this image right here is the timer for 4 hours, also what kinda of script is it?

  3. What solutions have you tried so far? I have also tried developer hub & youtube but I found nothing that would make this work.

Please help me if you can, thank you for reading this topic developers :wink:

4 Likes

If you want a countdown clock you need to use os.time(), os.difftime(), and os.date(). Using these you can determine the seconds since the UNIX Epoch using os.time(). Then, use os.difftime() to get the seconds between when you want the countdown to end making ure to covert that date into seconds since the UNIX Epoch. Then you will have the seconds between the current time and the time the countdown ends. Finally, with os.date() you can convert those seconds into months, days, hours, minutes, seconds, etc.

This topic has been brought up before and BanTech has provided a much more in depth answer. :happy2:

Im trying to use a script for the UI so it can be like this game Wait for 4 hours to leave a room - Roblox