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

Part color changer wont work?

So I have a part called "screen" in a model. My goal is to make it so that when someone presses a part on a board containing parts colored red, blue, green, etc, the screen will become the color of the part/brick pressed. The problem is, it doesn't work and I can't figure out why. Help is greatly appreciated.

----script in each of the colored parts  with click detectors inside
function click()
	script.Parent.Parent:FindFirstChild("screen").BrickColor = BrickColor.new(script.Parent.Name)
end

script.Parent.ClickDetector.MouseClick:connect(click)

1 answer

✓ Accepted answer

Try with

----script in each of the colored parts  with click detectors inside
function click()
    script.Parent.Parent:FindFirstChild("screen").BrickColor = script.Parent.BrickColor
end

script.Parent.ClickDetector.MouseClick:Connect(click)

2 comments

0

any errors or something?

0

wait nvm

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