Heyo Devforum! I am making a menu and I want it to be super easy to update (Add foods/drinks). I am using a folder with values, the values are named to the food and then the script is supposed to clone a text lable/button to each value and to change the text to the specific food.
But when I attempt to do this it clones the text buttons to the correct amount but changes the text of all of them to the same value.
This is my code:
local button = script.TextButton
local foods = script.Parent.Parent.Menu.Food:GetChildren()
for i = 1, #foods do
local food = button:Clone()
food.Name = foods[1].Name
food.Parent = script.Parent
food.Text = foods[1].Name
end
How would I go about doing this?
Gui:
Script Location:
Please get back to me ASAP.