In an earlier question I asked how to have a part with a clickdetector inside that gave you 500 cash. That script is now working but I can click it unlimited times and that takes away part of the game as it gives you an unlimited amount of money.
Is there a way that I can have it so when the player clicks the brick they get the 500 (so keeping the other script) but then the brick deletes itself or is unclickable. I need an answer for this as soon as possible please! Many Thanks!

2 comments
I think this is wrong, because the player can just click it again to fire the event, then possibly waiting again for no reason. Consider adding a debounce.
You can't click the clickdetector if maxactivationdistance = 0