I have been working on a Timer for my game, and after testing it with a friend, I noticed that the my time isn't the same as his. I'm assuming this is because the time is automatically set to 15 when the player joins.
Basically I want the time to be the same for everyone, and I have no idea how to do it. Anyone help would be great! (I'm not the best at scripting/explaining, so if anyone needs some clarification feel free to tell me).
Code Below
StarterGui -> ScreenGui -> TextBox -> LocalScript ->
local Min = 0
local Sec = 15
local In = 1
while true do
if Sec == 0 and Min == 0 and In == 0
then
Min = 5
In = 1
else
if Sec == 0 and Min == 0 and In == 1
then
Min = 1
In = 0
else
if Sec == 0
then
Min = Min - 1
Sec = 60
else
Sec = Sec - 1
wait(1)
game.Players.LocalPlayer.PlayerGui.GameTime.TextBox.Text=( Min .. " minutes; " .. Sec .. " seconds")
end
end
end
end
