I got a really simple timer (it's part of a bigger code) :

	function Timer()
		for i = 900,0,-1 do				
			wait(1)
			timer.Value = i
			game.ReplicatedStorage.RemoteEvents.TimerUpdate:FireAllClients(i)
			if timer.Value == 0 then
				GameEnded()
			end
				
			if gamemodeended.Value == true then
			break
		end
		end
	end	

what happens is the gui displays a glitching timer, for example it goes from 16 to 14 and then 15 (should display just 15) and it just keeps happening, the more clients, the more it glitches

the script is inside a server script, inside ServerScriptService .

2 comments

0

The problem is latency e.g. all client will get the information at different times. Also if you have a slower connection you will be spamming the client who cannot handle the requests. It is normal for Roblox users can also have ping spikes meaning a delay of e.g. 1 second will break the whole system.

0

^ this and a solution maybe would be making StringValues from where localscripts can read them, timer handled in a serverscript, or use tick() or os.time()