Randomized Skin shop help

Hi, how do I make it so that of the number of skins in a folder, 5 random ones will appear in the shop? Here is my code:

local skinsData = game.ReplicatedStorage.Skins:GetChildren()
local fiveRandomSkins = math.random(5, #skinsData)

function addSkins(data)
	for i, v in pairs(data) do
		local frame = createFrame(v.Name, v.Cost.Value, v, skins.Folder, "skin")
		if game.Players.LocalPlayer.SkinInventory:FindFirstChild(v.Name) then
			frame.Cost.Text = "Owned"
			frame.Button.Image = greenTick
		end
		
		if game.Players.LocalPlayer.equippedSkin.Value == v.Name then
			frame.Cost.Text = "Equipped"
			frame.Button.Image = greenTick
		end
		
		frame.Button.MouseButton1Click:Connect(function()
			local result = game.ReplicatedStorage.BuyItem:InvokeServer(v.Name, "skin")
			
			if result == "bought" then
				frame.Button.Image = greenTick
				frame.Cost.Text = "Owned"
				
			elseif result == "equipped" then

				
				for _, object in pairs(skins.Folder:GetChildren()) do
					if object:IsA("Frame") and object:FindFirstChild("Cost") then
						if game.Players.LocalPlayer.SkinInventory:FindFirstChild(object.Name) then
							object.Cost.Text = "Owned"
						end
					end
				end
				frame.Button.Image = greenTick
				frame.Cost.Text = "Equipped"
			end

		end)
	end
end

game.ReplicatedStorage.SendData.OnClientEvent:Connect(function()
	addSkins(skinsData)
	addTraps(trapsData)
end)

What i did after creating the fiveRandomSkins variable i replaced this parameter with fiveRandomSkins, however, the for loop in the function had issues. Does anyone know why?

This is the error that occured: Players.MysticalLuma.PlayerGui.MainGUI.Shop.ClientShop:87: bad argument #1 (table expected, got number)

I tried adding this but taht stil won’t fix it:

local rand = Random.new()

local fiveRandomSkins = skinsData[rand:NextInteger(5,#skinsData)]

I still can’t figure out what’s wrong.