If two remote events are fired at nearly the same time, does the first one that's fired always run first?

  1. What do you want to achieve?

I want to find out that if two remote events that are fired at nearly the same time, the first one that’s fired always runs first.

  1. What is the issue?

I’m not sure if there’s a small chance that the second remote event that’s fired can run first. I have a custom tool system and there’s two remote events that handle other players’ tools; an equip event and an unequip event. If, let’s say, an exploiter fired these two events side by side with the equip event firing on one line and on the very next line the unequip event firing. I tested this out, and so far the equip event always fully ran first from the start of the event to the end of it.

However, in case there’s a different situation where there’s a lot more calculations happening, the first event might run after the second event. The first and second remote events also don’t yield.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried testing it out on my own, but I’m not sure if there’s other facts I need to know. I also found no solutions on the Developer Hub.

You shouldn’t worry about that. You should make the code secured and check to make sure it makes sense to unequip something. You’re worried about an exploiter firing them quickly, which could break your code, but what if they unequipped first or they never equip it.

2 Likes

Its not humanely possible to fire 2 events at the same time, assuiming you tested this in Roblox Studio, the server and client are your PC, so there is virtually no delay, in real servers this can differ. Even if an exploiter did manage to fire 2 remotes at once, your UnEquipped remote should check if there’s something equipped.

1 Like

RemoteEvents don’t yield (which makes sense), but they’re ordered despite being UDP, regardless of ping and latency.

I wouldn’t worry about this issue too much if I were you.

1 Like

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