My script checks if a players Kills reach 2. When they do, it's supposed to show a gui on their screen.
Instead, when they get 2 kills, the gui doesn't show at all. Help?
local plr = game.Players.LocalPlayer
if plr.leaderstats.Kills.Value == 2 then
plr.PlayerGui.nicekills.MainFrame.TextLabel:TweenPosition(UDim2.new(0, 0, 1, 0), "Out", "Bounce", 2)
end

1 comment
It works, but in-game it says Players.MrSmenryBackup.PlayerGui.nicekills.MainFrame.Backgr:6: attempt to index local 'plr' (a nil value)