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

Why Do Local Scripts In GUI Not Change When You Join?

Asked by 5 years ago
Edited 5 years ago

Hiya, so I've been on heavy work for a game. There is a timer at the top that has this script inside of it:

local seconds = script.Parent.Parent.Time
local level = game.Workspace.Values.level.Value
script.Parent.Text = seconds.Value
while true do
if game.Workspace.Values.re.Value == true then
    local level = game.Workspace.Values.level.Value
    for i = 1,seconds.Value do
    script.Parent.Visible = true
    wait(1)
    seconds.Value = seconds.Value - 1
    script.Parent.Text ="The EF"..level.." will die off in "..seconds.value.." seconds."
    end
elseif game.Workspace.Values.re.Value == false then
    script.Parent.Text = ""
    seconds.Value = 149
    wait()
end
end

(re is the value that tells the script that the timer needs to be activated)

I was wondering if there was anyway for this GUI to appear regardless if someone joins in the middle of it counting down? Thanks!

0
I'm thinking that you should have the same timer in the sever .So when someone joins while the timer is already running just pass the server time into their gui using a remote event. Fad99 286 — 5y
0
Yeah have the timer in a server script and fire a remote event, with the time left as an argument, every second Sulu710 142 — 5y

Answer this question