Hey guys, I have a part name stored in a variable, it changes regularly, being in a for loop. As I said, it's a part and I need to use the path to it, but as it changes, I can't enter/concencate/insert the variable/part name in there.
This is what I'm aiming for:
1 | partName = "part28" |
2 | local part = game.Workspace.MyFolder.Model. --and here put the value of 'partName' |
How would I achieve this?
Thanks in advance.
1 | partName = "part28" |
2 | local part = game.Workspace.MyFolder.Model [ partName ] |
If Parts name changes you can do
1 | partName = part.Name |
2 | local part = game.Workspace.MyFolder.Model:FindFirstChild(partName) |