So, I'm trying to figure out a code to change the color of my part Color1 but it's not working I'm making a game and I take the testing very seriously because without a working game it will get dislikes. And I've trying to make this script for about a day now.
Heres my script:
script.Parent.ClickDetector.MouseClick:connect(function() script.Parent.Color1.BrickColor = BrickColor.Red() end)
I know it's not a lot but it's one of the main parts of my game.
Any help will be appreciated.
Change the script to this:
function onClicked() script.Parent.BrickColor = BrickColor.Red() end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Tell me if your confused