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

How do i figure out what time it is?

Asked by 10 years ago

Okay, so, I'm writing a plugin that does some stuff, and I want to make it so when it's done loading, it says "PluginName loaded! Time loaded: ", but i can't figure out how to get the time. I know it has something to do with tick(), and i know it's possible because I've seen someone do it before. Does anybody know how?

1 answer

Log in to vote
2
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago

Okay, I kind of ripped this script off of Kohltastrophe, but if you use this script in a LocalScript it should give local time, otherwise it will give time in Central time.

hour = math.floor((tick()%86400)/3600)
minute = math.floor(((tick()%86400)/3600-math.floor((tick()%86400)/3600))*60)
if minute<10 then minute = "0"..minute end

Long math equation isn't it?

0
Thank you sir, but, how do i figure out the second? 1GREENBOB123456 15 — 10y
0
Nvm, figured it out! Thanks! 1GREENBOB123456 15 — 10y
Ad

Answer this question