So I’m trying to make this script which automatically generates GUI images on the start of a game for every item in a folder in Server Storage, however I do not know how to index the item in Server Storage, how would I go about with this?
What I have so far (which is a MASSIVE mess
local SS = game:GetService("ServerStorage")
local RS = game:GetService("ReplicatedStorage")
local Name = RS:WaitForChild(script.Parent.Parent.Name)
local Info = script.Parent.Parent.Parent:WaitForChild("Info")
local ItemImage = script.Parent.Parent.Parent:WaitForChild("Info").ItemImage
local ItemPrice = ItemImage.Parent.ItemPrice
local ItemName = ItemImage.Parent.ItemName
local ValuePrice = ItemImage.Parent.Price
local SelectedItem = script.Parent.Parent.Parent:WaitForChild("SelectedItem")
local BuyButton = ItemPrice.Parent.Buy
local GetImage = Name.GetImage
local GetInfo = Name.GetInfo
local GetRequired = Name.GetRequired
local Template = script.Parent.Template
local maxCountbin = script.Parent.WeaponsCount
local maxCount = maxCountbin.Value
maxCountbin:Destroy()
--
while true do
if #script.Parent:GetChildren() < maxCount - 3 then
GetImage:FireServer() -- stopped here because I didn't know what to do lol
else
script:Destroy()
end
end