Answers for "roblox get descendants"

3

get descendants roblox

--[[
	instance
		child_1
			child_1_1
		child_2
		child_3
			child_3_1
]]

local children = instance:GetChildren()
print(children) --[[ prints:
	{
		[1] = child_1,
		[2] = child_2,
		[3] = child_3
	}
]]

local descendants = instance:GetDescendants()
print(descendants) --[[ prints:
	{
		[1] = child_1,
		[2] = child_1_1,
		[3] = child_2,
		[4] = child_3,
		[5] = child_3_1
	}
]]
Posted by: Guest on July-21-2021

Code answers related to "roblox get descendants"

Browse Popular Code Answers by Language