I have multiple parts with the same name grouped, and I wanted to know how to insert a billboard gui into all of the parts with the same name via script. This is what I currently have:

model = game.Workspace.Model
nameof = "Part"
local billboard = Instance.new("BillboardGui")
billboard.Parent = game.Workspace
billboard.Name = "Test"

for i,v in pairs(model:GetChildren()) do
	if v.Name == nameof then 
	
		billboard:Clone(v) 

	end
end

Thank you for your time.

4 comments

0

Do you get any errors in the output? Or does it just not work?

0

It just doesn't work. There are no errors in output.

0

maybe try using ipairs?

0

On line 10, try doing billboard:Clone().Parent = v. I've not seen Clone(x) used to set the parent.