In my status effects system I’m trying to get it so when a Status is removed it checks if the Character table has any status effects or not. However it always prints “Table empty” even if there is something inside the table?
function StatusEffects:RemoveStatusEffect(StatusEffect)
StatusEffects.Affected[self.Humanoid.Parent.Name][StatusEffect] = nil
self.DeathConnection:Disconnect()
if (StatusEffects.Affected[self.Humanoid.Parent.Name][1]) then
print("Table not empty")
else
print("Table empty", StatusEffects.Affected)
end
setmetatable(self, nil)
table.clear(self)
table.freeze(self)
end