Spawning NextBot via Script, Help!

I’ve been trying to create a spawner using an entity and a ents.Create(“nz_risen”) function.
Upon creating the entity, it gives me nav mesh error, even after when I do nav_generate and I am able to spawn in by spawn menu.
I have no idea how to make a spawner. Please Help

Here the entire Code :

someone plz?



local ent = ents.Create("nz_risen")
ent:SetPos(Vector(0,0,0))
if (IsValid(ent)) then
ent:Spawn()
end


this what you want?

StickmanJohn, thank you for the response, but it still gives me the same error.

you never posted your error