Get players time?

Is there a way where I can get the players time? Like actual time. AM PM stuff. Let me know I can do that.

Thanks for your help,

papahetfan

I had to do this in my game recently. You can use os.time(),

But it will be different on server and client.

1 Like

Suggest going to this documentation of os.date():
https://developer.roblox.com/en-us/api-reference/lua-docs/os

To get the player’s time do os.date("%I : %M : %S %p") on a local script.

DateTime.now():ToLocalTime();

Something along those lines, what will be returned is a table with the following keys:
image

In relation to the AM and PM stuff you can also use os.date:

Example:

os.date("%p") --am or pm