I'm painfully new to the LUA scene...

…and I’m trying to figure out how to get the name of someone you’re hitting with a swep. Like, if I wanted to make a hobo stick, that when you hit someone they turn into a hobo via rp_hobo (their username here). How do I get their name?

Sorry if I’m breaking any rules, this is one of my first Facepunch posts as well.

Its ok. Im not sure if this is 100% right, due the the RP Name system in DarkRP, but I think you want:
local ent = self.Owner:GetEyeTrace().HitEntity
RunConsoleCommand(“rp_hobo”, ent:Nick())

Isn’t that kind of a weak system since any player could make any other player a hobo, anytime?

You should probably use Player.ConCommand so that the hit player runs the command himself. Better yet, bypass console commands and have the swep switch him directly to the hobo class. That’s the only way to do it that is actually safe.

Fuck there needs to be a way to delete posts