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

Will the timer happen at the same time for every player? (Read description)

Hi, Lately I was making a GUI timer and, it is a local script in a textlabel, in a screen gui in StarterGui.. I want to know if this script will work for all the players or if would only happen for every single player that joins... Cause I definitely don't want every player with a different timer..

local timer = Instance.new("IntValue", workspace)
timer.Name = "RoundTimer"
timer.Value = 10
local text = script.Parent.Text

local debounce = true

while wait() do
	-- repeat till the intermission is over..............................
	timer.Value = 10
	repeat
		timer.Value = timer.Value - 1
		script.Parent.Text = "Intermission for "..timer.Value.." Seconds"
		wait(1)
	until timer.Value < 1
	-- finish with intermission, now teleport player.....................
	local plr = game:GetService("Players").LocalPlayer
	local char = plr.Character
	if plr then
		if char then
			char.UpperTorso.CFrame = CFrame.new(workspace.TeleportArena.Test.Position)
		end
	end
	-- done with the teleporting to map, remake the game timer >:(.......
	timer.Value = 60
	repeat
		timer.Value = timer.Value - 1
		script.Parent.Text = "Round going on for another "..timer.Value.." Seconds"
		wait(1)
	until timer.Value < 1
		if char then
			char.UpperTorso.CFrame = CFrame.new(workspace.Lobby.Position)
		end
end


So thats a timer script (Local script) in Starter Gui and I wanna know if the timer will be the same for everyone and not different for everyone.. Any help?

1 comment

0

No. It depends when the player joins.

1 answer

✓ Accepted answer

Yes it will be different. Essentially, every time a player joins, the timer will start. If a player joins 2 seconds after another, that players timer will be 2 seconds behind the other one's.

SOLUTION

Make a local script that does the same thing, except a server script is ONLY changing the value of the int value. Then, in the starter gui, under the text label, make a local script that sets the text labels text to the value of the intvalue

2 comments

0

Hope this helped

0

Thanks for the Help, you better have got all the rep I am giving you xD

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