I am trying to make a SurfaceGui ScrollingFrame shop but I don't want to duplicate the frame and edit the text, etc for each item. This script work's some what I just can't figure out how to make it position every frame 31 studs(or whatever the GUI Position is measured in) away from eachother. Can anyone help me?
gather = game.ServerStorage.GearStorage:GetChildren()
scroll = script.Parent.ScrollingFrame
for _,v in pairs(gather) do
local frame = script.Template:Clone()
frame.Name = v.Value
frame.Parent = scroll
frame.Position = frame.Position + UDim2.new(0,0,0,31)
frame.ItemName.Text = v.Value.." | "..v.Price.Value
end
