Greetings! I am trying to create a material picker like this:
I do not want the text Enum.Material. in my text.
How can I fix this?
I had to put tostring()
to get the material to properly register as a string.
My code is pretty simple:
local MaterialTemplate = script.Parent.Template
for _, Material in pairs(Enum.Material:GetEnumItems()) do
local MaterialFrame = MaterialTemplate:Clone()
MaterialFrame.TextLabel.Text = tostring(Material)
MaterialFrame.Name = tostring(Material)
MaterialFrame.Visible = true
MaterialFrame.Parent = script.Parent.ScrollingFrame
end
If you can help, that would be great!
Thanks in advance!