I am trying to have my scoreboard update on playerchange instead of every 2.5 seconds. The code I have is giving errors.
function self.ScrlPan:Refresh() self:Clear(true) table.Empty(self.players) --snipped player panel stuff end function self.ScrlPan:Think() for _, panel in pairs(self:GetItems()) do if not IsValid(panel:GetTable().player) or #self.Players ~= #player.GetAll() then self:Refresh() end end end
Error I’m getting is that self:GetItems() is nil. It might be because I had the think above the refresh so I moved it but it’s untested.