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 ?
COMMUNITY QUESTION
How to add time to game, and ways ?
1 answer
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:
local label = script.Parent --The TextButton
while true do wait(.5)
local t = game.Workspace.DistributedGameTime
local h = t / 3600
local m = t % 3600
m = m / 60
local s = m % 60
label.Text = h .. ":" .. m ..":" .. s
end
If this doesn't work, tell me ASAP so I can try to fix it
Also, accept is this helped
1 comment
0
Thanks, it helped, because I just started scripting, idk how and what does what.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
http://wiki.roblox.com/index.php?title=API:Class/Workspace/DistributedGameTime
Thanks for the reference to the wiki.