I have a script that sets a boolvalue’s value to false after a certain amount of time, but the value is staying true. What is wrong with it? Here is my script (I marked the lines that aren’t working):
local rep = game.ReplicatedStorage
local rem = rep:WaitForChild("Remotes")
local cd = 20
wait(10)
while true do
rem.VoteStart:FireAllClients()
wait(10)
rem.RoundVote:FireAllClients()
wait(10)
rem.GameStart:FireAllClients()
wait(.1)
local rt = rem.RoundNumbers.Value * rem.RoundTime.Value
print(rt)
wait(rt)
rem.Voting.Mode.One.Value = 0
rem.Voting.Mode.Two.Value = 0
rem.Voting.Rounds.Three.Value = 0
rem.Voting.Rounds.Five.Value = 0
rep.Remotes.VoteChecks.Personals.One.Value = false -- not working
rep.Remotes.VoteChecks.Personals.Two.Value = false -- not working
rep.Remotes.VoteChecks.Personals.Three.Value = false -- not working
rep.Remotes.VoteChecks.Personals.Five.Value = false -- not working
print ("checked") -- This prints and the loop continues
cd = 20
rem.Intermission:FireAllClients()
while cd > -1 do
rem.CD.Value = cd
wait(1)
cd = cd - 1
end
end
My ReplicatedStorage layout (yes i know not everything in the remotes folder is remotes lol):
Thanks in advance,
DaBisawesome123