Currently your code does nothing. You declare two local functions, but never use them.
Also, don't compare boolean vars to constants, use them directly.
And last but not least, the code won't do what you want - supposing you fix everything, the first function will count all the *living* mobs.
Also, don't compare boolean vars to constants, use them directly.
And last but not least, the code won't do what you want - supposing you fix everything, the first function will count all the *living* mobs.
function HandleCheckCommand(Player) local CountIfMob = function(Entity) if Entity:IsMob() then Mobs = Mobs + 1; end end Player:GetWorld():ForEachEntity(CountIfMob); Player:SendMessage("There are currently " .. Mobs .. " mobs." ); return true; end