In the script below it always chooses the last if statement. The values are intvalues that count up the points. And if a team wins it will show the points comparing but if the teams tie it will show it was a tie. But for some reason it always says its a tie even tho a value is greater than the other. Can anyone help? Sorry if you didn't understand.
local GameLength = workspace.MapChosen:FindFirstChildWhichIsA("Folder").Info.GameLength.Value
for i = GameLength,1,-1 do
Status.Value = "Destroy the other teams statue before the other team does!".." (" ..i..")"
for x, player in pairs(plrs) do
if player then
local character = player.Character
if not character then
table.remove(plrs,x)
end
wait(1)
end
if i == 1 then
local BlueTeamStatue = script.Parent.RedTeamStatue:FindFirstChild("Tracker")
local RedTeamStatue = script.Parent.RedTeamStatue:FindFirstChild("Tracker")
if RedTeamStatue.Value.Value < BlueTeamStatue.Value.Value then
Status.Value = "Red team wins! with a score of ".. tostring(RedTeamStatue.Value.Value).. " to " .. tostring(BlueTeamStatue.Value.Value)
ValueRemover()
game.Teams.Red:Destroy()
game.Teams.Blue:Destroy()
wait(5)
break
elseif BlueTeamStatue.Value.Value < RedTeamStatue.Value.Value then
Status.Value = "Blue team wins! with a score of ".. tostring(BlueTeamStatue.Value.Value).. " to " .. tostring(RedTeamStatue.Value.Value)
ValueRemover()
game.Teams.Red:Destroy()
game.Teams.Blue:Destroy()
wait(5)
break
elseif BlueTeamStatue.Value.Value == RedTeamStatue.Value.Value then
Status.Value = "It was a tie!"
ValueRemover()
game.Teams.Red:Destroy()
game.Teams.Blue:Destroy()
wait(5)
end
end
end
end

6 comments
It simply means that BlueTeamStatue.Value.Value = RedTeamStatue.Value.Value. There is nothing we can do unless if you give us the code that decides these values.
What does ValueRemover do?
@brokenVectors https://pastebin.com/B6F6RL83
@gskw they remove values out of the character but you can ignore them I guess they really have nothing to do with this.
Is there something that would reset Tracker.Value.Value?
No nothing should reset the value...