In Game Clock Help

What is the best way to record a time period (down to at least milliseconds if possible!) and then check again later so that I can calculate the difference between two time periods.

Just store a variable? Or perhaps there is a reason you cant?


local old = tick()

wait(5) --// do some waiting

local now = tick() --// get the current time
local difference = (now - old) / 1000

print("There was a difference of", difference, "milliseconds") --should output something around ~5000
1 Like