I know this is a really simple question, but it really caught my attention. If i do this:
local function func_name(value)
-- do something
end
game.Players.PlayerAdded:Connect(function(plr)
func_name(plr)
end)
This code will listen every time a player joins, and fire a function.
But my question is: If two players join almost at the same time, and the second player join while the function is being run, would the function fire only once or system would wait until the function called first is finished?

1 comment
Events are queued and run in a set order the functions are connected. A yield will cause the next queued code to run