What would be the best way to verify in which order clients fired an event once it is received?

hello! the title is a bit odd but I’ll try to explain my question here the best i possibly can

so basically, i’m planning on improving a system that has to deal with the order in which players do something, but the way it does it is that it only takes the order in which the server receives an event being fired by the clients in the respective order that they do it — here’s where my problem lies — the way it currently works means that the intended order could be offset depending on individual player conditions (mainly network delay or ping), so I thought of making it so that instead of solely relying on itself, the clients will send something in the event fire that the server can read and get the “true” order all the events were fired in, to then do its sorting accordingly.

i was originally considering using tick() for this, given I’ve used it in client only applications and it’s pretty reliable, however i’ve read in other posts that tick is influenced by timezones, which is not good for my use case at all, so that’s where my question comes in.

what would be a good way to give the server a reliable way of accurately getting the order, while respecting the “real order” in which every player did the action on their own client, without letting it be influenced by ping?

many thanks in advance!!!

1 Like

You can use workspace:GetServerTimeNow() and send it to the server to determine the order.

1 Like