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

What is wrong with this?

for i = 15,0,-1 do
	game.Workspace.Music:Play()
	status.Value = "Intermission:"..i
	wait(1)
_G.gameplayers = {}
for i ,v in pairs(game.Players:GetPlayers()

if v then

table.insert(_G.gameplayers,v.Name)
end
end
end
end

1 answer

_G.gameplayers = {} --you might want this here if you don't want it reset every time it loops.
for i = 15,0,-1 do
    game.Workspace.Music:Play() --as long as music exists this will work.
    status.Value = "Intermission:"..i --as long as status exists this will work.
    wait(1)
for i ,v in pairs(game.Players:GetChildren()) do --it is 'getchildren' and 'do'
table.insert(_G.gameplayers,v.Name)
end
end--you had to many ends

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