Tick is NOT working

When playing in studio, it works, but when doing teamtest or playing in the actual game, it prints sum like -3000

repeat task.wait()  until (tick() - CurrentTick) >= SettingModule.HealingTime

Where i get currenttick from:

local CurrentTick = tick()
Communication:FireServer(CurrentTick, "Activate")


1 Like

btw when i printed it on the localscript, it worked fine, but on server it doesnt

This might be happening because the tick() time from the client gets a bit outdated by the time it reaches the server, especially outside the studio. In the studio, the delay is tiny.

I figured out a solution by just doing currenttick = tick() instead, however i am wondering why does it work in singpleplayer studio and not multiplayer?

The discrepancy is due to network latency in multiplayer, which isn’t present in singleplayer studio.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.