I am trying to make a script that changes a bool value inside every player to false if another bool value, which is inside the Replicated Storage is true. If that value is false then the bool value inside every player will become true, but it doesn't work. What is the problem here?
And also in the output it doesn't show anything related to this script.
Here is the script:
local repstorage = game.ReplicatedStorage
local round = repstorage.RoundInProgress.RoundInProgress
local Players = game:GetService("Players")
if round.Value == true then
wait(0.5)
for i,v in pairs(Players:GetChildren()) do
v.ChangeTeam.Value = false
end
elseif round.Value == false then
wait(0.5)
for i,v in pairs(Players:GetChildren()) do
v.ChangeTeam.Value = true
end
end
Thanks!

2 comments
What is the output?
In the output it doesn't show anything related to this script.