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

How to add time to game, and ways ?

Asked by 6 years ago

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 ?

0
Thanks for the reference to the wiki. jamefran 10 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

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

0
Thanks, it helped, because I just started scripting, idk how and what does what. jamefran 10 — 6y
Ad

Answer this question