|
| 15 Nov 2015 03:50 AM |
-- Currently I have this, which adds frames to the scrollingframe parent, but there is no spacing. I tried multiple times to give it a spacing of UDim2.new(0, 0, 0.025) between the frame children, but the attempts were unsuccessful. Can you guys help?
local function FurnitureUpdated(NewFurniture) Furniture = NewFurniture Gui.HouseFrame:ClearAllChildren() local Current = 0 Gui.HouseFrame.CanvasSize = UDim2.new(0, 0, 0.30*#Furniture, 0) local Unit = 0.30/(0.30*#Furniture) for _, OwnedFurniture in next, Furniture do if OwnedFurniture then local FurniturePiece = CloneFurniture:clone() FurniturePiece.Name = OwnedFurniture FurniturePiece.Label.Text = "Furniture Piece : "..OwnedFurniture FurniturePiece.Size = UDim2.new(1, -14, Unit, 0) FurniturePiece.Position = UDim2.new(0, 0, Current*Unit, 0) FurniturePiece.Visible = true FurniturePiece.Parent = Gui.HouseFrame end Current = Current + 1 end end |
|
|
| Report Abuse |
|
| |