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?
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.
1 | local a = tick() |
2 | local hour = math.floor(a/ 60 / 60 % 24 ) |
3 | local minute = math.floor(a/ 60 % 60 ) |
4 | local second = math.floor(a% 60 ) |
5 |
6 | print (hour.. ":" ..minute.. ":" ..second) |