Should I use DateTime.now() or Workspace:GetServerTimeNow()?

Hello! I am creating a live event on Roblox and am currently in a dilemma about ensuring the event is synced properly across servers.

Most backend procedures are done on the server, which includes tracking the time for the players as well. So I am currently using DateTime.now(), which, as far as I know, is “cheap” to call. The only drawback is that it uses the “device’s local clock,” and that could be a problem as players can easily exploit it. The other alternative is Workspace:GetServerTimeNow(), a much safer choice but “expensive” to call.

Remember, I am currently using DateTime.now() on the server. Would players be able to exploit it this way? If so, that’s a sign for me to switch to Workspace:GetServerTimeNow(). Albeit I doubt that would happen since it’s on the server. What do you think?

Nope its the server, they cant do anything.

1 Like

To add on: As long as you aren’t using remote events or highly protect these remote events, then a player shouldn’t be able to exploit it an example would be like StartEventRemote:FireAllClients() then it just starts the event regardless if the time is met or not if an exploiter decides to fire the event to themselves. i would take precaution and only publish the live event day of (remotes or whatever you are using) at midnight or something. But keep a countdown in the workspace or where ever :slight_smile:

2 Likes