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

Error with my kills gui? {HELP}

Asked by
Relatch 550 Moderation Voter
10 years ago

This gui is shown when a players kills reach 2. But, I have a error with this.

local plr = game.Players.LocalPlayer
moved = false

while true do
    wait(5)
    if moved == false and plr.leaderstats.Kills.Value == 2 then
        moved = true
        plr.PlayerGui.nicekills.MainFrame.Background.TextLabel:TweenPosition(UDim2.new(0, 0, 2.5, 0), "Out", "Bounce", 2)
        wait(7)
        plr.PlayerGui.nicekills.MainFrame.Background.TextLabel:TweenPosition(UDim2.new(0, 0, 5, 0), "Out", "Quad", 1)
    end
    wait(1)
end

ERROR: Players.MrSmenryBackup.PlayerGui.nicekills.MainFrame.Backgr:6: attempt to index local 'plr' (a nil value)

0
Is this in a LocalScript? M39a9am3R 3210 — 10y
0
Oh. Relatch 550 — 10y

Answer this question