It's not to give player points, it has to give points in-game. But it doesn't. Here's the code:
function checkBlue()
local bluecount = 0
if game.Workspace.RoundRunning.Value == true then
for i = 1, #players do
if players[i].Character ~= nil then
if players[i].Team.Value == "BlueTeam" then
bluecount = bluecount + 1
end
end
end
end
if bluecount == 0 then
time.Value = 0
game.Workspace.RoundRunning.Value = false
gm.Value = "The red team has won!"
wait(2)
gm.Value = "Awarding 15 points to red team (+15 Player Benefits)"
for i = 1, #players do
if players[i].Team.Value == "RedTeam" then
if players[i].PlayerStats.PlayerBenefits == true then
players[i].PlayerStats.Points.Value = players[i].PlayerStats.Points.Value + 30
players[i].PlayerStats.PlayerWins.Value = players[i].PlayerStats.PlayerWins.Value + 1
players[i].PlayerStats.RoundsPlayed.Value = players[i].PlayerStats.RoundsPlayed.Value + 1
elseif players[i].PlayerStats.PlayerBenefits == false then
players[i].PlayerStats.Points.Value = players[i].PlayerStats.Points.Value + 15
players[i].PlayerStats.PlayerWins.Value = players[i].PlayerStats.PlayerWins.Value + 1
players[i].PlayerStats.RoundsPlayed.Value = players[i].PlayerStats.RoundsPlayed.Value + 1
end
elseif players[i].Team.Value == "BlueTeam" then
players[i].PlayerStats.RoundsPlayed.Value = players[i].PlayerStats.RoundsPlayed.Value + 1
end
end
end
end
