Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to add a "Timer" into everyones PlayerGui so the time will be the same?

I put it into "StarterGui" but then realised the time would not be exactly the same. I would like it to be exactly the same. Suggestions?

1 answer

✓ Accepted answer

Script 1 in Workspace

local time = Instance.new("IntValue", workspace)
time.Name = "Timer"
wait(.5)
for i = 5, 0, -1 do --Wait 5 seconds, end at 0 seconds, take away one second per second
wait(1)
workspace.Timer.Value = i
end
--Chunk

Script 2 in the Gui

local textbox = script.Parent
local text = workspace.Timer
while wait() do
textbox.Text = "Round will begin in "..text.Value.." seconds."
end

3 comments

0

Thank you.

0

Line 4 in the second script should be "workspace.Timer.Value = i" and it doesn't have to be in a separate script.

0

@Golden The workspace.Timer.Value was my fault, thanks, but I already knew about the 2 scripts. It would be more convenient.

This discussion is preserved as it was. New answers, comments, and votes are closed.