Round system efficiency

I made a round system using remotes, which are fired whenever a player dies/leaves to update the amount of players left in a GUI + check whether the round can end. My question is that could this have been made with a simple while wait() function (+ some other functions to detect death or leaving) with (almost as) good efficiency as my system?

Do not do it with while wait(), also there are better ways for checking that. You dont even require a remote for it, you could just iterate through the player list thats current ingame and use the CharacterRemoving event on them and it will detect when the player leaves or dies.

A alternative for while wait() is:

local runService = game:GetService("RunService")
while runService.Heartbeat:Wait() do

1 Like

I currently use CharacterRemoving and send a remote to update the GUI showing the amount of players left per team and to eventually end a round.

For a popular game of mine, we do have a single script that manages a round system for the game.

We use a while true do wait() and it works very well. It may not be exact as events, which can be processed in an ordered fashion, but it does allow us to check for many other methods that could end a round periodically. The game has never encountered any issue with this polling-style system and the game has nearly 200 million visits.