Spawn a prop.

Hello what I am trying to do is spawn a Object ( a christmas present ) when a detective kills a traitor in TTT but I cannot seem to get it to work and I am getting no errors.

Can someone help me with my code?



util.PrecacheModel("models/katharsmodels/present/type-2/big/present2.mdl")


hook.Add("PlayerDeath","Spawnentity",function( victim, infl, attacker)

 Vector1 = victim:GetPos()
 
	if victim:IsPlayer() and attacker:IsPlayer() then
	
		if victim:GetRole() == ROLE_TRAITOR and attacker:GetRole() == ROLE_DETECTIVE then
	
	ent1 = ents.Create("prop_physics") 
		
		if (  !IsValid( ent ) ) then return end
		
		ent:SetModel("models/katharsmodels/present/type-2/big/present2.mdl")
		ent1:SetPos( Vector1 )
		ent1:Spawn()
		
		end
		
	end

	end)


You’re not setting ent1s model, you’re setting ents, which doesnt exist.

Dident even notice that. I need to work on checking my syntax’s