How do I make a time, like to show how long the server has been running since and what are the ways to do it ?
Make a part and add a SurfaceGui to it. Then add an TextLabel to the SurfaceGui. Customize the TextLabel how you want. Now insert a Script into the TextLabel. Write the following into the script:
01 | local label = script.Parent --The TextButton |
02 |
03 | while true do wait(. 5 ) |
04 | local t = game.Workspace.DistributedGameTime |
05 | local h = t / 3600 |
06 | local m = t % 3600 |
07 | m = m / 60 |
08 | local s = m % 60 |
09 | label.Text = h .. ":" .. m .. ":" .. s |
10 | end |
If this doesn't work, tell me ASAP so I can try to fix it
Also, accept is this helped