Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 9 years ago

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?

Locked by EzraNehemiah_TF2, Redbullusa, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 9 years ago

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
0
Thank you. CoderOfTheMonth 0 — 9y
0
Line 4 in the second script should be "workspace.Timer.Value = i" and it doesn't have to be in a separate script. GoldenPhysics 474 — 9y
0
@Golden The workspace.Timer.Value was my fault, thanks, but I already knew about the 2 scripts. It would be more convenient. EzraNehemiah_TF2 3552 — 9y
Ad