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

Help with my unlock notification?

Asked by 8 years ago

Unlock notification have to show up one time! (GuiUnlock closes with a button) if is use it with the "while true do" the gui opens after you press on close back open, how can i fix that? without while true do its not working..

wait(5)
player = script.Parent.Parent.Parent
unlock = player.leaderstats.Level

while true do
wait (0.5)
    if unlock.Value == 4 then
        script.Parent.GuiUnlock.Visible = true
    elseif unlock.Value == 11 then
        script.Parent.GuiUnlock.Visible = true
    elseif unlock.Value == 25 then
        script.Parent.GuiUnlock.Visible = true
    elseif unlock.Value == 35 then
        script.Parent.GuiUnlock.Visible = true
    end
end 


0
This script should be in the playergui, and you can reference a player with game.Players.LocalPlayer in local scripts. yelsew 205 — 8y

Answer this question