I am trying to create a script that parents an entity that I made to a players head, but how do I exactly do that?
I got slightly confused by the wiki so I hope someone can clear this up for me
I got this so far:
local function init() local test = ents.Create("ent_test") if ( !IsValid( test ) ) then return end test:SetMoveType( MOVETYPE_NONE ) for k, v in pairs(player.GetAll()) do test:SetParent() // what now :/ end end hook.Add( "Initialize", "xoxo", init )
Basically what i am trying to achieve here is, that whenever a player joins he gets a prop attached to him