So, I am making a script that when you die you will not get points.. But if you survive you get 10 points. how do I fix this?
for _,v in pairs(game.Players:GetChildren()) do
v.PlayerGui.Ament.TextLabel.Text = "Game Ended!"
end
wait(3)
for _,v in pairs(game.Players:GetChildren()) do
v.PlayerGui.Ament.TextLabel.Text = "10 Points To Survivers!"
end
for i, v in pairs(game.Players:GetPlayers())do
inGame = v:FindFirstChild("InGame")
if inGame then
if inGame.Value == true then
v.leaderstats.Points.Value = v.leaderstats.Points.Value + 10 --Points Per Round Survived
end
end
end

2 comments
This won't work as expected, due to the 'wait' command (you'll end up waiting 3 seconds per player). You need two completely separate for loops with the 'wait' command between them - the first loop just makes the message "Game Ended!", the second loop does the rest.
Thanks for pointing that out.