i know foreverHD made a community tutorial on how to do this sort of stuff but i struggle to understand the code tbh.
i have a black slot in the middle and i just want to clone slots to the right with a gap of 10 ig. my slots are cloning but the position of each slot is staying the same to the original slot. im well aware that my way is super inefficient but i would really love some help, thanks very much guys!!
local plr = game.Players.LocalPlayer
local playerGUI = plr.PlayerGui
local frame = playerGUI.UI_init.frameholder
local GapDistance = 10
local slot = Instance.new("Frame", frame)
slot.Name = "slot"
slot.Position = frame.Position
slot.AnchorPoint = Vector2.new(0.5,0.5)
slot.Size = UDim2.new(0,150,0,180)
slot.BackgroundColor3 = Color3.new()
local slotsizeX = slot.Size.X
local UI_corner = Instance.new("UICorner", slot)
UI_corner.Name = "UI_corner"
UI_corner.CornerRadius = UDim.new(0, 15)
for R = 1,10,1 do
local slotClone = slot:Clone()
slotClone.Parent = slot.Parent
slotClone.Position = slotClone.Position + UDim2.new(0, UDim.new(0, slotsizeX) + GapDistance, 0, 0)
slotsizeX += slotsizeX
GapDistance += 10
end