I want to save players names and the time and day they joined my game I Try to use DataStoreService but I don't know how to get the time and day when the players join's my game any ideas on how I can save names of players who played my game and time and day? is there a function that can get the time?
✓ ANSWER ACCEPTED
How do I save players names and time when they joined my game?
1 answer
✓ Accepted answer
Use tick() in a local script to return you with a Player's local time.
I did the basic math here for you, this will print your current time if used in a local script.
local a = tick()
local hour = math.floor(a/60/60%24)
local minute = math.floor(a/60%60)
local second = math.floor(a%60)
print(hour..":"..minute..":"..second)
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
I think you can try os.time() or something... I don't know, I can never figure out time. I tried getting a time gui and it was so complex I almost fell asleep
os.time() only gives me hours,mines, sec I need days,hours,mins,sec
BTW I am looking for a saving system
I think tick uses local time zones for clocks?