I am making a entermession and the varible for the entermession wont change.
game.Players.PlayerAdded:Connect(function(player)
while true do
wait()
if game.ServerScriptService.System.Action.Value == 1 then
game.ServerScriptService.System.works.Value = false
game.ServerScriptService.System.Action.Value = 0
local time = 20
while time >= 0 do
print("Entermession: "..time)
player.PlayerGui.wordy.TextLabel.Visible = true
player.PlayerGui.wordy.TextLabel.Text = "Entermession: "..time
local time = time - 1 -- I feel like it is here but this code has no error.
wait(1)
end
while time == -1 do
player.ServerScriptService.System.works.Value = true
local time = false
player.PlayerGui.wordy.TextLabel.Visible = false
end
end
end
end)

3 comments
can somebody please answer.
shouldn’t you use a for loop?
it does not really matter