tick() uses the system’s timezone, so it’s not consistent across the Roblox’s servers and your device. It works the way you’d expect in studio because studio makes a local server using your system, including its timezone
os.time() will be the expected Unix Timestamp, but does not have millisecond precision (canonical method)
client and server align
workspace:GetServerTimeNow() will be the expected Unix Timestamp, with millisecond precision
client and server align
os.clock() has millisecond precision (canonical method for benchmarking)