Remove all entities with a given type

How do I do this? I tried this:
for _, ent in pairs(ents.GetAll()) do
if ent:GetClass() == “LuaScoreboard” then ent:Remove() end
but it doesn’t work…

You sure that it’s the right classname? **[Entity.GetClass](** returns the class names in lowercase in my experience, you might want to try using “luascoreboard” instead.

But when I do ents.Create( “LuaScoreboard” ) it works fine.

for k, v in pairs( ents.FindByClass(“LuaScoreBoard”) ) do

Omg I love you

You’re welcome.