Making an entity owned by a player once spawned.

I’m working on my first script as a lua noob, I am making a Health Vendor. It’s taught me a lot.
But, I have ran into a problem. I cannot make the entity acknowledge that it’s owned by the person that spawns it ( Through the F4 menu for Darkrp ).

My code to make it give the money is

			if activator:canAfford(1) then activator:addMoney(-1) end

This manages to make it take money but not give it to the player that spawned it, so I’m assuming that the entity doesn’t know who the owner is, how do I make it know this from it being spawned?


I edited darkrp’s files so that it adds a NetworkString of the spawned user’s steamid into the ent for a script I did, try that maybe?