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

How to change color on click?

local cd = script.Parent

cd.MouseClick:Connect(function()
      script.Parent.Parent.BrickColor = BrickColor.new("Red")
end

1 answer

You were pretty close. 2 things: First of all, there is no Red BrickColor. There is stuff like Maroon and Really red. Second of all, you forgot to place a close bracket at the end to close off the connected function.

local cd = script.Parent

cd.MouseClick:Connect(function()
      script.Parent.Parent.BrickColor = BrickColor.new("Really red")
end)

1 comment

0

There is red brick color. script.Parent.Parent.BrickColor = BrickColor.Red

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