# Player Spawns And Team-AI Idling

For players and Team-AI to spawn, you need to set up [PlayerSpawner Elements](https://wiki.modworkshop.net/books/beardlib-editor-reference/page/mission-elements-wip#bkmrk-playerspawner). By default a new project already has a PlayerSpawner Element, however you should create at least 3 more so players and AI don't clip into each other when spawning.  
To set up Player spawns, spawn at least 4 Player Spawner Elements at the positions you want the heist to start. 
To keep things organized, you can place a [MissionScript Element](https://wiki.modworkshop.net/books/beardlib-editor-reference/page/mission-elements-wip#bkmrk-missionscript) and let that one execute those 4 player spawns. Player Spawner need to be executed on startup, or by the startup-element.  
You can place as many spawns as you want. The game will automatically spawn players and Team-AI randomly at any executed PlayerSpawner element.  
A common setup is to have multiple groups of PlayerSpawner elements, with separate MissionScripts executing them. Instead of the startup element executing all PlayerSpawner at once, it executes a [Random Element](https://wiki.modworkshop.net/books/beardlib-editor-reference/page/mission-elements-wip#bkmrk-random), which randomly picks one of the spawner groups.

To add idle animations for AI-Teammates, place an [AreaTrigger](https://wiki.modworkshop.net/books/beardlib-editor-reference/page/mission-elements-wip#bkmrk-areatrigger) over the same location as a player spawner and set it the instigator to `ai_teammates`. The area trigger then executes a [SpecialObjective](https://wiki.modworkshop.net/books/beardlib-editor-reference/page/mission-elements-wip#bkmrk-specialobjective) with the animation you want. Make sure to disable the area triggers after spawning, otherwise they may accidentally trigger again mid-heist if an AI-Teammate walks through them.