Hello. Today I got one question - what better: Clone() or Instance.new()?
I think when I need copy of object, Clone() will be better, but what’s about when I need change some params?
local DownButton = Instance.new("ImageButton")
DownButton.Name = "DownButton"
DownButton.BackgroundTransparency = 1
DownButton.Size = UDim2.new(0, 200, 0, 90)
DownButton.Position = UDim2.new(0.5, 0, 0, BrushHolderSizeY)
DownButton.AnchorPoint = Vector2.new(0.5, 0)
DownButton.ZIndex = 175
GUIforRecoloring[DownButton] = "Basic"
DownButton.Image = "http://www.roblox.com/asset/?id=10815539520"
DownButton.ImageRectSize = Vector2.new(256, 256)
--AND problem is here:
local UpButton = DownButton:Clone()
UpButton.Name = "UpButton"
UpButton.ImageRectOffset = Vector2.new(256,0)
UpButton.Position = UDim2.new(0.5, 0, 0, BrushHolderSizeY + 40)
GUIforRecoloring[UpButton] = "Basic"
--Or
local UpButton = Instance.new("ImageButton")
UpButton .Name = "UpButton"
UpButton.BackgroundTransparency = 1
UpButton.Size = UDim2.new(0, 200, 0, 90)
UpButton.Position = UDim2.new(0.5, 0, 0, BrushHolderSizeY + 40)
UpButton.AnchorPoint = Vector2.new(0.5, 0)
UpButton.ZIndex = 175
GUIforRecoloring[UpButton] = "Basic"
UpButton.Image = "http://www.roblox.com/asset/?id=10815539520"
UpButton.ImageRectSize = Vector2.new(256, 256)
UpButton.ImageRectOffset = Vector2.new(256,0)