Spawnprop command not working

So I’m making a simple spawn prop command. But for some reason It doesn’t spawn. When I do it, this is the output, it never sets the props position:

and here is the code:
concommand.Add( “hera_spawnprop”, function( ply, cmd, args )
if not ply:IsSuperAdmin() then return end
local _t = {}
_t.start = ply:GetShootPos()
_t.endpos = ply:GetShootPos() + ply:GetAimVector() * 80
_t.filter = ply
ply:ChatPrint( “[Hera] Trace defined”, HUD_PRINTCONSOLE )
local trace = util.TraceLine( _t )
local prop = args[ 1 ]
ply:ChatPrint( “[Hera] Trace created”, HUD_PRINTCONSOLE )
local _prop = ents.Create( “prop_physics” )
ply:ChatPrint( “[Hera] Entity creation initiated”, HUD_PRINTCONSOLE )
ply:ChatPrint( “[Hera] Spawned prop”, HUD_PRINTCONSOLE )
_prop:SetPos( trace.HitPos or _t.endpos )
ply:ChatPrint( "[Hera] Set prop position " … trace.HitPos or _t.endpos, HUD_PRINTCONSOLE )
_prop:SetModel( prop )
ply:ChatPrint( "[Hera] Prop created " … prop, HUD_PRINTCONSOLE )
Hera.Log( 1, “%s has spawned the prop %s”, ply:Nick(), prop )
end )
Any idea why this is happening? Thanks in advance.

Edit: sorry I think I was wrong, since half your code work…

Well, does your code get any errors?
Just a few things I noticed:

  1. Player.ChatPrint prints to the player’s chat. If you want to print to the player’s console using HUD_PRINTCONSOLE, use Player.PrintMessage.
  2. In general, it’s better to not use underscores in front of your variable names, as that’s what’s used for environment stuff. It shouldn’t break your script though.