I created a relatively simple entity spawning script but, it’s having issues with spawning since addons are loaded after this script is ran.
I put this in the autorun/server directory of lua
hook.Add( "PostGamemodeLoaded", "SpawnPiano", function()
local ent = ents.Create( [[gmt_instrument_piano]] )
ent:GetPhysicsObject():EnableMotion( false )
ent:SetAngles( Angle(0, 140, 0) )
ent:SetPos( Vector( -154, 100, 17.5 ) )
ent:Spawn()
end)
Is there anything else called after PostGamemodeLoaded?