I have a model with multiple parts inside it with the same name and I am trying to use a single script to execute it. Is it possible to set the multiple parts to a single variable so I can run it easier? The code I attached is the audio part of the script. Model = Light3, Part = Bulb, Bulb contains the sound (BuzzingLight).
audioT = {}
for _, v in ipairs(workspace.Light3:GetDescendants()) do
if v == "BuzzingLight" then
table.insert(audioT, v)
print(audioT)
end
end
audioT.Volume = 0

1 comment
you could let it put a variable on true and then put a script in every part that says if variable = true then script,parent.(whatever you want to happen here) end, because then you can use script.parent for a part even if it has the same name. Hope this helps in anyway. greetings