while wait() do if repstorage.GameRound.Value == "Controller" then if flag1.Value == "White" and flag2.Value == "Green" and flag3.Value == "White" then greenscore.Value = 1 yellowscore.Value = 0 end end end
^ How come the above works
repstorage.RoundTag.Changed:connect(function(value) if value == true then if repstorage.GameRound.Value == "Controller" then if flag1.Value == "White" and flag2.Value == "Green" and flag3.Value == "White" then greenscore.Value = 1 yellowscore.Value = 0 end end end end)
And this one dosent. I would prefer the one with the Changed event over a while true do loop. There are no errors in the whole script. Please help.
Mmm, the first thing I notice is if value == true then
on line 02, Maybe change this to if if repstorage.RoundTag.Value == true then
. If that doesn't work the after each if statement, place a print. Like so. This can help identify where the problem lies.
repstorage.RoundTag.Changed:connect(function(value) print('Changed') if repstorage.RoundTag.Value== true then print('IsTrue') if repstorage.GameRound.Value == "Controller" then print('IsController') if flag1.Value == "White" and flag2.Value == "Green" and flag3.Value == "White" then print('GreenScoreIncreased') greenscore.Value = 1 yellowscore.Value = 0 end end end end)
Hope this helps, Brandon. <3