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
Enums, like Material, are Integers, not Strings. Change DropMaterial
to a IntValue.