local data = {"noob", "string", "NeilTheGreat"} for _, v in pairs(data) do ------------------- this entire section needs help. print(v) local stringName = v for _, ayo in pairs(workspace.Folder:GetChildren()) do ayo.Name = stringName end end
What I am basically trying to do here is, there is a folder with plain string values, in fact 3 string values. When I try to change their name to the items in data, it ends up changing it to NeilTheGreat each time for all of the values. And since I want it random, [1], [2], [3] won't work. Any help would be gr8! thanks
Give this a try, not sure if it will work:
local data = {"noob", "string", "NeilTheGreat"} for i, v in pairs(data) do print(v) local stringName = v for ii, ayo in pairs(workspace.Folder:GetChildren()) do if i == ii then local num = i ayo.Name = data[num] end end end