I have made a little timer to help the player know when the round is over, although when players come into the game later meaning some time after the first player has joined, the timer won’t show for them and it is very irritating. When the game starts it should fire to every player, which it does, but for some reason it only shows for the people who were the first to join the game and skips the whole script if you came in after.
Here is the script
local db = false
game.ReplicatedStorage.timer.OnClientEvent:Connect(function()
local c = script.Parent
c.Visible = true
local timer = 120
while timer > 0 do
if db == false then
timer = timer - 1
c.t.Text = timer
wait(1)
else
db = false
break
end
end
c.Visible = false
end)
game.ReplicatedStorage.Luigi.OnClientEvent:Connect(function() -- these extra are for determining the amount of players or if Luigi captured everyone
db = true
end)
game.ReplicatedStorage.Boos.OnClientEvent:Connect(function()
db = true
end)
Any Help Is Appreciated!