Problem with parent/get entity "index"

Hi! I am new here. I have a problem with parent to my entity. I am beginner in lua. I have created a “env_flare” entity i want to parent to my SENT.

	local flare = ents.Create("env_flare")
	flare:SetPos( self.Entity:GetPos() )
	flare:SetParent( ent )


 local ent = ents.Create("sent_JCO1S10") 

this is my code for spawning flare. In code its parented but in-game its is still in one place :confused:

PS. Sorry my english isnt well.

Have you spawned sent_JCO1S10? Tested to see if the ent itself works?

Yep its my own entity. Maybe its other way to get my SENT id/ name ?

i think you need to give full code becuse of doing

local ent = ents.Create("sent_JCO1S10")

shoudlent work at all because you need to spawn the entity first and stuff

EDIT: I Fixed the problem!

Thanks very much!