This guy "worldspawn"

For some reason when an entity is created the NWEntity:Owner always equals “worldspawn”. What would cause this?

How is the entity being created?

Default, thorough the spawn menu. I’ve never has this problem it just randomly happened. I didn’t change anything but use an auto file inclusion system.

Can you show code for “NWEntity:Owner”?
What gamemode?



local ply = LocalPlayer()

surface.CreateFont("EntText", { font = "Neou Thin", size = ScreenScale(7), antialias = true, blursize = 0.4})

hook.Add("HUDPaint", "DrawAdminMode", function()
	if ply:GetNWInt("InAdminMode") == true then
		local Width = ScrW()
		local Height = ScrH()
		local PlayerTrace = util.TraceLine( {
			start = EyePos(),
			endpos = EyePos() + EyeAngles():Forward() * 10000,
			filter = function( ent )
				if ( ent:GetClass() == "prop_physics" ) then 
					return true 
		local EntityOwner = PlayerTrace.Entity:GetNWEntity("Owner")
		local box = {}
		box.x = 20
		box.y = 30
		box.height = 70
		if EntityOwner ~= nil and isstring(EntityOwner) then
			box.width = 200	+ (string.len(EntityOwner)*12)
			box.width = 200
		draw.RoundedBox(0, box.x, box.y + (box.height*0.6)-10, box.width, box.height, Color(30,30,30))
		draw.RoundedBox(0, box.x, box.y - 10, box.width, box.height*0.6, Color(60,60,60))
		draw.SimpleText("ADMIN MODE", "EntText", box.x + (box.width/2), box.y - 10 + (box.height*0.6)/2, Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
		if PlayerTrace.Entity:IsValid() and EntityOwner ~= nil and isstring(EntityOwner) then
			draw.SimpleText("Entity Owner: ", "EntText", box.x + (box.width/2), box.y + (box.height*0.6) - 10 + (box.height/2), Color(255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
			draw.SimpleText( "No entity trace.", "EntText", box.x + (box.width/2), box.y + (box.height*0.6) - 10 + (box.height/2), Color(255, 255, 255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)

If you are using prop protection you can use Entity:GetCPPIOwner():Name()

I hate this guy!

Killed by prop? worldspawn
Killed by wire things? worldspawn
Killed by fall damage? worldspawn
Killed by drowning? worldspawn

all he does is RDM on every server, why don’t people just ban him already?

but seriously, have you tried Entity:GetCPPIOwner() ?

To the local player, any entity not ever seen by the local player can be seen as null or worldspawn…

I’d suggest making sure kill messages are sent as text; additionally others can pick up props and throw them so it may not always be the owner. Additionally if a prop crushes a player then it is typically the world that gets the credit for the kill because the prop merely “pushed” the player and the world was immovable so it “crushed” the player… At least that’s what makes sense looking through the eyes of source engine logic.