Should I use Coroutine on Server events?

I am not sure about how how efficiently a function would run with or without coroutines so the question is should I use coroutines in server events.
My assumption is if I use if I don’t use Coroutine inside server events if multiple people invoke that event at once, it will not run multiple times. Correct me if I am wrong.
An example,

Event.OnServerEvent:Connect(function(player)
local someValue = player.AFile.SomeValue.Value
...Codes
wait(forsometime)
print(someValue)
end)

now if someone invokes this event and at the same time another person invokes this event will the “waiting time” show the latest current players value who invoked this event or it’s gonna work individually?

Events always run asynchronously. You are fine to handle it normally and without coroutines.

1 Like