Hey, so as you can see I am trying to make a part change it's color to blue after being clicked, which happens but it does not get destroyed as it should, why is that? I would then like to do so the BrickColor = BrickColor.Random() and when the color would become blue it would destroy itself, thanks.
function ColorChange()
script.Parent.BrickColor = BrickColor.Blue()
if BrickColor == BrickColor.Blue() then
script.Parent:Destroy()
end
end
script.Parent.ClickDetector.MouseClick:Connect(ColorChange)

7 comments
Thank you!
No problem. Please mark my answer as the answer to your question.
We both earn reputation if you do that.
Sorry this is my first time using this site. How do I do it?
It should be next to my answer or under it.
Okay done, sorry for taking so long but I didn't have the accept answer button on my screen, so I tried it in incognite and it was there. Really weird.
Weird. Alright, thanks.