I currently have two scripts, one to handle RemoteEvents and the other to handle RemoteFunctions. I know I can have all the RemoteEvents handled in one script because the connect functions would create new threads and hence allow the other event connections to work. However, since the RemoteFunctions are handled by creating a function, I’m not very sure whether they would yield the main thread and thus prevent the rest of the connections from working. I’m really not sure if I’m even saying things correctly.
--RemoteEventsScript.
game.ReplicatedStorage.RE1.OnServerEvent:Connect(function()
--Stuff.
end)
--RemoteFunctionsScript.
game.ReplicatedStorage.RF1.OnServerInvoke = function()
--Stuff.
end
With that said, in the first place, can I even have multiple RemoteFunction listeners in the script on its own?
If they do yield the main thread then actually could I do:
game.ReplicatedStorage.RF1.OnServerInvoke = spawn(function()
--Stuff.
end)
I’m probably making a lot of huge mistakes…