I’m trying to make a part that when clicked, makes sound and changes to a specific colour (red)
I’ve tried combining two seperate scripts into one, but it hasn’t worked. The two scripts below are the ones I have tried combining into one. In regards to the part, it is inside a model along with the script, audio and a clickdetector. I have tried searching on the Developer Hub to solve this issue, but I couldn’t find a solution
Okay, here is what I have so far in the changed script
local clickDetector = workspace.Part.ClickDetector
script.Parent.ClickDetector.MaxActivationDistance = 0
script.Parent.SFX.Playing = true
script.Parent.ClickDetector.MaxActivationDistance = 32
There seems to be an issue with the word “onclicked” on the last line of the script, and the script analysis says that I should add an end under the first line? Also for applying the BrickColor format, where would I put this in the new script?