I have no idea how I'll make my script work. It changes material. I would love a detailed explanation because I sometime have problems with Strings.
wait(1)
for i,v in pairs(script.Parent.Buttons:GetChildren()) do
if v:FindFirstChild("ClickDetector") then
v.ClickDetector.MouseClick:connect(function()
script.Parent.Color.Material = v.Material
script.Parent.Color2.Material = v.Material
script.Parent.Parent.Parent.DropMaterial.Value = v.Material --Problem here
end)
end
end
DropMaterial is a StringValue

2 comments
But the IntValue's Value is in numbers and I get and error that is : - Invalid value 0 for enum Material
I cahnged it and so on, Didn't work.