In my game I would like to have a system where it announces everyone who didn’t die during the game. It doesn’t sound very complicated, but I just can’ figure it out. I want the system to make a list of everyone who got into the game, and then anyone who didn’t die would be a winner.
I can not figure out how to get this working.
I tried looking on the Dev Forum, and I couldn’t find anything to help me. I am completely lost on how to achieve this.
I would want this to be similar to the system they have in Natural Disaster survival.
If I did that correctly, all that’s left to do is concatenate (combine) the list of the remaining players in the table and display that as a string (message)
local msg = ""
for i, player in pairs(round_players) do
if player and player.Parent then
msg = msg..", "..player.Name
end
end
msg = msg.." were the survivors this round!"
And some additional logic to make sure the player is still in the server.
Not 100% if this works but it should be very close. Hope this helps
EDIT: I didn’t actually address the Died event connection I’ve made in this example, but for the sake of simplicity I’m not going to go into detail on that, so you could simply just call :LoadCharacter() on each player in the example iterator I gave you at the bottom.