I have a script that you can dig(im making a game like treasure simulator) and the question is ....is it just me or is something wrong with this script.error???? I added this script into a part..to say when u click part it removes.

script.Parent.MouseButton1Click:connect(function(player)
script.Parent:Destroy()
end)

When you awnser please just fix my code and dont add extra lines..this is all i truely need.

Is my code right or wrong because this guy named Lando64000 keeps saying that my code is wrong.....wait do i need to replace MouseButton1Click with something else...HELP!! I really want to proove him wrong

4 comments

0

MouseButton1Click is an event of gui objects. I think you meant to use the MouseClick event of click detectors

0

What's the error?

0

wait so do i replace MouseButton1Click with MouseClick????

0

Yes