my value script is not working it does not do anything when it gets to the value help
there was no error in the output
script :
Health2 = game.ReplicatedStorage.SafeHealth2
Health1 = game.ReplicatedStorage.SafeHealth1
Healthtoloser = 2
Win = script.Parent.Parent.Win
Text = script.Parent.winner
while true do
wait(0.5)
if Health2.Value < Healthtoloser then
Win.Visible = true
Text.Text = "Great Britain Wins!"
print("BritWins")
wait(5)
Health2.Value = 4000
Health1.Value = 4000
Win.Visible = false
end
end
while true do
wait(0.5)
if Health1.Value < Healthtoloser then
Win.Visible = true
Text.Text = "Great Britain Wins!"
print("BritWins")
wait(5)
Health2.Value = 4000
Health1.Value = 4000
Win.Visible = false
end
end

2 comments
The 2nd while true do loop does not play since there is already one above it, you should combine both of those if statements into one loop.
building on what will said, lua will run code from left to right, top to bottom, when it hits a while loop it'll jump back to the top of the loop before continuing on, and since the top loop never breaks, the bottom loop never gets ran.