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

Time in game?

Asked by 9 years ago

I made a gui where it shows the time in game I just need to know what to put next in the script im at the point where it says "Current Time".. ? I just need to know what to put in the ? so I can find the time?

1 answer

Log in to vote
-1
Answered by 9 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

These are examples of getting time from kohls admin, maybe it can help you. game.Lighting.TimeOfDay

function GetTime()
local hour = math.floor((tick()%86400)/60/60) local min = math.floor(((tick()%86400)/60/60-hour)*60)
if min < 10 then min = "0"..min end
return hour..":"..min
end
Ad

Answer this question