I'm trying to make a part that sets it's X and Y size to another part's X and Y size.
local buildings = workspace.Buildings:GetChildren()
local roofs = Instance.new("Folder", workspace)
for i = 1,#buildings do
local roof = Instance.new("Part", roofs)
roof.Size.X = buildings[i].Size.X
roof.Size.Z = buildings[i].Size.Z
end
Error = X cannot be assigned to
Why isn't it changing the X and Z size of the part to the X and Z size of the building[i]?
Any help or tip appreciated !

1 comment
Okay, thanks for your advice! :)