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

Whats wrong with my unlock notification?

Asked by 8 years ago

Gui have to shows up when player have level 4 or 11 or... But something is wrong? Can someone help me?

wait(5)
player = player.parent.parent.parent
unlock = player.leaderstats.Level

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

1 answer

Log in to vote
0
Answered by 8 years ago

on line 2, 'parent' needs to have a capital P

Ad

Answer this question