So I know I've asked a ton of questions on this but even though I have been tinkering around a lot with this script I need someone who knows what they're doing better than I do. Using this script I would like it to display a message when either the time runs out or they're are no "infected" players.
function survivor_finish(text,time)
time_left = 20--just to test with
while time_left >= 0 do
time_left=time_left-1
wait(1)
print(time_left)
if #getTeam(Game.Teams.Infected) == 0 or time_left==0 then
m=Instance.new("Message",Workspace)
m.Text = text
wait(time)
m:Destroy()
end
end
end
survivor_finish("Time has run out, survivors win!",3)
Thanks!
