Target player problem


What do I put in for x if I want the hit player to become a hobo.

I already have it so it runs the code only when you hit someone, but how the fuck do I target that person.

self.Owner works if I’m trying to change myself to something.

Agh this is pissing me off so much I’ve tried everything, and I’ve been working on it for a week now with no success

[LUA] function HoboChange( ply )

local trace = {}
trace.start = ply:GetShootPos()  
trace.endpos = ply:GetShootPos() + ply:GetAimVector()*100 
trace.filter = ply  

local tr = util.TraceLine(trace)

if ( !tr.Hit ) then return end

if tr.Entity:IsPlayer() then


concommand.Add( “HoboChange”, HoboChange ) [/LUA]

Something like that? :s