Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScrollingFrame = script.Parent.ScrollingFrame
- local ProductFrame = game.ReplicatedStorage.Product
- local Products = game.ReplicatedStorage.ShopProducts:GetChildren()
- for _, ShopProduct in pairs(Products) do
- local ProductFrameClone = ProductFrame:Clone()
- ProductFrameClone.Price.Text = "$".. ShopProduct.Price.Value
- local Camera = Instance.new("Camera", ProductFrameClone.ViewportFrame)
- ProductFrameClone.ViewportFrame.CurrentCamera = Camera
- local ProductClone = ShopProduct:Clone()
- ProductClone.Parent = ProductFrameClone.ViewportFrame
- Camera.CFrame = CFrame.new(ProductClone:GetPivot().Position + Vector3.new(10,10,10), ProductClone:GetPivot().Position)
- script.ProductPurchase:Clone().Parent = ProductFrameClone
- ProductFrameClone.Name = ShopProduct.Name
- ProductFrameClone.Parent = ScrollingFrame
- end
Advertisement
Add Comment
Please, Sign In to add comment