This code prints out " 1748985129.0703309", given that’s its tick.
On the local script:
while wait(1) do
print(workspace:GetServerTimeNow())
end
This prints out “1749003129.763406”
This testing was done in studio.
Is there any reason why this function is so inaccurate? What exactly does it do? I assumed that it was meant to help people time clients with server, but both report their own separate values.
According to the documentation on GetServerTimeNow, it returns “a Unix timestamp, similar to os.time()”, not tick(). I just tested code like yours in studio using os.time() instead of tick() on the server and it appears to correspond to the value that the client prints using workspace:GetServerTimeNow(), however I’m not 100% sure if this is guaranteed to hold in a live server.
You could also consider using workspace:GetServerTimeNow() from the server by the way - this is likely the best approach to ensure consistency between client and server.