Okay,So ive got myself a screengui inside startergui. (Its a textlabel) Its basically a timer. Whenever a player respawns,The gui changes,If it was 10 seconds left when he/she respawned,It would be 20 the next.
Is there any way i can make it so that it stays the same upon death? For example if it was 5,It stays 5 when it respawns. Basically keeps itself the same?
Alright so here is a perfect system for countdown timers:
Controller Script (The one changing the text)
local alert = game.Lighting.Alert for i = 120, 0, -1 -- A basic for loop for the countdown alert.Value = i wait(1) end alert.Value = "Begin!" wait(1) alert.Value = ""
Put this inside of the TextLabel
local alert = game.Lighting.Alert update = function() script.Parent.Text = alert.Value end alert.Changed:connect(update) update() --So that it will load Alert when you spawn
Alright now put a StringValue inside Lighting called "Alert"
This basically will make it so you can update every single players screen all in unison easily and it will work on death as well
Sidenote: You can name Alert anything you want, it just has to be consistent. I just prefer to use call it Alert