I am making a horror game that can be singleplayer or multiplayer. However, I want to play a cutscene for all players after they all join and load into the server. How would I go about waiting for players?
I am pretty sure you would just loop through all the players and see if they have a character, which would mean they are loaded, I am pretty sure something like this should work.
local Players = game:GetService("Players) for _, player in pairs(Players:GetChildren()) do -- Loops through all the players repeat wait() until player.Character -- Sees if they have a character if not then repeat again to see if they have it. end -- Code here after all players characters are there or if they are all loaded in