Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I fix this script which announces list of survivors?

    players = game.Players:GetPlayers()
    for _,v in pairs(players) do
	if(v.Character) then
		v.Character:MoveTo(Vector3.new(243,1.5,-225.4))
		wait(15)
		survivors = v.Name
		survivors = survivors..", "..v.Name
		Finished = Instance.new("Message")
		Finished.Parent = game.Workspace
		Finished.Text = "The following have survived:" (survivors)

It doesn't work. It is supposed to list the survivor names.

1 answer

Survivors = {}

players = game.Players:GetPlayers()
for _,v in pairs(players) do
if(v.Character) then
    v.Character:MoveTo(Vector3.new(243,1.5,-225.4))
    wait(15)
   table.insert(Survivors,v.Name)
    Finished = Instance.new("Message")
    Finished.Parent = game.Workspace
    Finished.Text = "The following have survived"..table.concat(Survivors,',')

TADA

+1 if this helped!

1 comment

0

Earlier I was panicking so much that I couldn't think. I will try this one and if it works, I +1!

This discussion is preserved as it was. New answers, comments, and votes are closed.