My timer is changed upon joining a game so I was wondering how I would make the timer universal. The timer I have is based off of local players and is in the StarterGui.
Is the Timer in most games based on the first person who joins? I don't understand exactly how it works for their games.
game.Players.LocalPlayer.PlayerGui.ScreenGui.Timer.Text=( Min .. " : " .. Sec)
This is how I display my Time on the screen so you can see that I use localplayer.
I was thinking of making two separate scripts to where one finds time universally I guess depending on the first person who joins.
The second would then find the localplayer's status on them being in game or not using the variable ingame to try to manipulate when someone is in game or not.
ingame is 0 when they are outside of the game and is 1 when they are in the game. I do not know how to find if they are inside or outside the game without this timer.
local Min = 3
local Sec = 0
ingame = 0
local Game = game.Workspace.Game.Position local Respawn = game.Workspace.Respawn.Position
while true do
if Sec == 0 then
Min = Min - 1
Sec = 60
else
Sec = Sec - 1
wait(1)
local SecondLength = tostring (Sec)
local SecondActualLength = #SecondLength
if SecondActualLength == 1 then
game.Players.LocalPlayer.PlayerGui.ScreenGui.Timer.Text=( Min .. " : 0" .. Sec)
else
game.Players.LocalPlayer.PlayerGui.ScreenGui.Timer.Text=( Min .. " : " .. Sec) --Normal Display
end
if Sec == 0 and Min == 0 and ingame == 0 then
ingame = 1
Min = 10 -- ingame time (time they will play in the game)
Sec = 0
local teleport = game.Players:GetChildren() --teleportation to the game
for i = 1, #teleport do
teleport[i].Character:MoveTo(Vector3.new(Game.X, Game.Y, Game.Z))
end
end
if ingame == 1 and Sec == 0 and Min == 0 then
Min = 1 --sets time for intermission
Sec = 0
local respawn = game.Players:GetChildren() --teleportation back to spawn.
for i = 1, #respawn do
respawn[i].Character:MoveTo(Vector3.new(Respawn.X, Respawn.Y, Respawn.Z))
ingame = 0
end end end end
I'm sorry for the horrible indention and sorry if you spend your time on this. It really is a bad explanation of what is going on but basically it is just a timer from intermission to being inside the game and is different for every player when someone joins so I'm wondering how to make it to where everyone has the same time.

4 comments
I don't know if this is really what you're asking for, but you could add two intValues(one names Sec and the other Min) somewhere such as ServerStorage. Then have a script add 1 every second to Sec, then when Sec reaches 60, make it back to 0 and add 1 to Min
Then you would have a local script take those two intValues and output it to something like a screenGUI
thank you I bet that will work since the timer is under server storage, thank you so much
this is so unnecessary. follow this yt tutorial made by roblox, it still works fully https://www.youtube.com/watch?v=XfniMdHI30c