The title is saying everything, let’s take an example that the calculated pets are 8, well, it is only cloning one instead of those 8, here is the script:
for _, Pet in pairs(ShopItems:GetChildren()) do
local Item = PrefabItem:Clone()
local PetData = PetsData[Pet.Name]
Item.Parent = Frame
Item.Name = Pet.Name
Item.Description.Text = PetData["Info"]
Item.Price.Text = PetData["Cost"]
Item.Picture.Image = "rbxassetid://" .. PetData["ImageId"]
Item.Buy.MouseButton1Down:Connect(function()
local HasBought = Item:FindFirstChild("HasBought")
game.ReplicatedStorage.PetAdd:FireServer(Item.Name)
print(player.Name.." sent a request to the server to buy something!")
end)
wait(0.2)
end
There’s any reason of why that’s happening i hope you help me! Thanks ![]()