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

script only works (updates) when player respawns?

Asked by
mehssi 20
9 years ago
if game.Workspace.minutes.Value == -5 then
    script.Parent.Visible = true
elseif game.Workspace.minutes.Value ~= -5 then
    script.parent.Visible = false
end

can you help me make this work whenever and not just only if player respawns

1 answer

Log in to vote
0
Answered by
unmiss 337 Moderation Voter
9 years ago

This is because you're doing this only once. Put it in a loop.

while wait(1) do
    if game.Workspace.minutes.Value == -5 then
        script.Parent.Visible = true
    elseif game.Workspace.minutes.Value ~= -5 then
        script.parent.Visible = false
    end
end
Ad

Answer this question