Do multiple RemoteEvent calls run simultaneously?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    Just want to know whether two function calls that fire server the same remote will both run, and simultaneously, like two separate threads.

  2. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Looked through the wiki on remote events and functions, and I do not see anything talking about it.

Have you actually tried it out? Are you using a RemoteEvent or RemoteFunction? Are you calling from the same script or separate scripts? Please provide more context if you can possibly the script(s) that you are using. I’m not too sure what your goal is.

It uses a RemoteEvent, they run in the same script. The goal is that a player clicks on a tile with a selected unit and a RemoteEvent is called where all the verification is made and the script creates a path for the unit to the selected tile. However, it dawned on me that this may not be able to run simultaneously, it may be in a que, if you will, waiting for each call to finish. This isn’t that big of a deal since it should be done relatively quick, still, I need to consider it.

The simple answer: Yes, it will. Any things that use :Connect is basically making a new coroutine.

5 Likes

I’m answering this with basic Lua logic, but true asynchrousness isn’t necessarily a thing in Lua. Lua just waits for a yield and then hip-hops between “”“”“”“”“”“”““threads””“”“”“”“”“”“” when something yields.

If you didn’t want a nitpicky answer, then yes, they do. They’re events after all.

1 Like

Oh they don’t have to run in the exact same time, that would be impossible, just wanted to know if a coroutine is created for each call. Which was answered, thank you, though!

Ohhhhh, okay XD. I thought you meant something else somehow.

Think this might be a thread you’re interested in, with responses from a software engineer at Roblox. It’s asking the same question - well, because it is the same question.

1 Like