DeriveGamemode("sandbox")

i started making a new gamemode from scratch today, with a gamemode tutorial base from the wiki and it works fine when it’s just using the base, but when i try to derive the gamemode from sandbox i get this error

ERROR: GAMEMODE:‘PlayerSpawn’ Failed: sandbox/gamemode/init.lua:40: stack overflow error

Just wondering if anyone is having this problem, or if it’s just a “wait until the new patch comes out” kinda thing.

sadly

add this in your gamemode init.lua

function GM:PlayerSpawn( pl )
// - FROM BASE - //
if ( GAMEMODE.TeamBased && ( pl:Team() == TEAM_SPECTATOR || pl:Team() == TEAM_UNASSIGNED ) ) then
GAMEMODE:PlayerSpawnAsSpectator( pl )
return
end

	pl:UnSpectate()

	hook.Call( "PlayerLoadout", GAMEMODE, pl )
	hook.Call( "PlayerSetModel", GAMEMODE, pl )
// ------------- //

// - FROM SANDBOX - //
	GAMEMODE:SetPlayerSpeed( pl, 250, 500 )
// ---------------- //

end

Use base, for your gamemode.