I have couple parts in folder and inside of them there are UI’s with names of the items, and i was wondering how can i get all UI’s because usually i would use
local Billboards = script.Parent:FindFirstChildWhichIsA("BillboardGui")
But that would get only the first child, How would i get all of them?
Also i don’t know if you know about TopbarPlus but any idea why this doesn’t work?
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local icon = Icon.new()
icon:setLabel("Show names")
icon:setTip("Show names of the items")
icon.selected:connect(function()
for i, v in pairs(game.Workspace.Items:GetChildren()) do
if v:IsA("TextLabel") then
if v.Visible == false then
v.Visible = true
end
end
end
end)
icon.deselected:connect(function()
for i, v in pairs(game.Workspace.Items:GetChildren()) do
if v:IsA("TextLabel") then
if v.Visible == true then
v.Visible = false
end
end
end
end)
I am not sure what you mean, but you would use GetDescendants() to get all of the children of the UI, including the descendants of those children.
You would use GetChildren() to get all of the children of an object in the game. GetChildren() only gets the immediate children of that object. For a visual explanation look here:
local billboards = script.Parent:GetChildren()
-- :GetChildren() is a roblox method that returns all children instances of an object in the form of an array.