Garry's Mod

Garry's Mod

Playable Piano
DaGold 22 Oct, 2017 @ 2:58pm
Piano crashing server when used
function Piano()

local piano = ents.Create( "gmt_instrument_piano" )


if ( !IsValid( piano ) ) then return end

piano:SetPos( Vector( -8.699451, -311.127136, 5 ) )
piano:SetAngles( Angle (2.175800, -89.692444, 0.000000 ) )

piano:Spawn()

end
hook.Add( "Initialize", "Piano", Piano )


That's the code I am using to spawn the piano initially. It will spawn where I want it to but whenever you press E to use it the server will crash.