Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you change this value from Color to Material?

Here. I tried editing the values... Heres the script

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.BrickColor = v.BrickColor
			script.Parent.Parent.Parent.DropColor.Value = v.BrickColor
		end)
	end
end

Heres the script with the one i tried editing and failed at it.

wait(1)
for i,v in pairs(script.Parent.Buttons:GetChildren()) do
	if v:FindFirstChild("ClickDetector") then
		v.ClickDetector.MouseClick:connect(function()
			script.Parent.Material.BrickMaterial = v.BrickMaterial
			script.Parent.Parent.Parent.DropMaterial.Value = v.BrickMaterial
		end)
	end
end

1 answer

For material it is just Material. So use:

wait(1)
for i,v in pairs(script.Parent.Buttons:GetChildren()) do
    if v:FindFirstChild("ClickDetector") then
        v.ClickDetector.MouseClick:connect(function()
            script.Parent.Material.Material = v.Material
            script.Parent.Parent.Parent.Material.Value = v.Material
        end)
    end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.