Find instance with the instance name and the index

Hello guys, I know my title is not clear but I dont really know how to call it so ima explain it.

So I have multiple folders named Upgrade but each one has a different index
image

So in the script I need to find the upgrade folder with the good index but I have no idea how can I do,

I tried this

local i = config.Level.Value + 1
RS.Towers:FindFirstChild(selectedTower.Name).Upgrade..i

and this

local i = config.Level.Value + 1
or this `RS.Towers:FindFirstChild(selectedTower.Name).Upgrade[i]

and that return
image

so thats not working, if you guys can help me i’ll really appreciate it :slight_smile:

does this work?

RS.Towers:FindFirstChild(selectedTower.Name)[`Upgrade{i}`]

Yeah, thank you so much for the help :slightly_smiling_face: :heart:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.