Bot join team

How to make bot join team? Because when I type “bot” now it comes as no team, just black guy without animations.

as far, theres no default command to make them join a team, you need to make one yourself.

Get the object of the bot and use SetTeam: https://wiki.garrysmod.com/page/Player/SetTeam

Late to the party I know, but this is a function I made a while ago.



function TeamedBot()
RunConsoleCommand("bot")
	timer.Simple(5,function()
		for k, v in pairs(player.GetBots()) do
			v:SetTeam(--TEAM NAME--)
		end
	end)
end
concommand.Add("teamed_bot", TeamedBot)


Or if you want it to join a random team do this.



v:SetTeam(math.random(TEAM1 ,TEAM2, TEAM3))