For Loop Help (Can't get to something)

Hello, recently I’ve been making a tutorial guide I’m trying to make a beam towards him. With my recent coding, for some reason even with print statements its not getting the correct parent.

My question : How can I locate the tutorial guide correctly through my for loop code?

Example of what I’m doing -

local Tycoons = Work["Twin'sTycoonKit"].Tycoons:GetChildren()
local Tycoon = nil
local NPC = nil
local Root = nil

for i,v in pairs(Tycoons) do
	local Owner = v.Owner

	if Owner.Value == Player then

		Tycoon = v
		
		
		for _,x in pairs(v:GetDescendants()) do
			print(x, "TEST")
			if x.Name == "TutorialGuide" then
				NPC = x
				Root = NPC:FindFirstChild("HumanoidRootPart")
			end
		end
		
	end
end

I tried going inside the variable v. Which is normally the player’s tycoon. When I get the descendants it should normally get all of child’s of the player’s tycoon. For some reason it is not? Also the main importance of this code is to grab the player’s tycoon and tutorial guide so I can later add beams when needed.

Example of explorer -

What am I doing wrong? Can someone explain the easiest way to this?

what’s printing on x?

Assuming there is an “Essentials” model with the same things under each tycoon, it’s easier to do:

NPC = v.Essentials.TutorialGuide
Root = NPC:FindFirstChild("HumanoidRootPart")

Also, if it’s not printing anything when getting the descendants, it is because there is no tycoon found with the player as the owner.

2 Likes