Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my click detector script does not work on an image label?

Asked by
seikkatsu 110
4 years ago
script.Parent.MouseButton1Down:Connect(function()

    print(script.Parent.Name)

end)

pic of my explorer: https://imgur.com/a/ahrm9tS the script i am curently working on is the "Deploi" one. Also i have tested this on an empty baseplate and worked just fine

Any help is apriciated!

0
I don't get what you are trying to do here? RyanTheLion911 195 — 4y

2 answers

Log in to vote
0
Answered by
Nickzus 24
4 years ago

Hello,

Try to make that script a Local Script. When you are trying to manipulate a StarterGui, you need to change it Locally, thus you need to use a local script.

Ad
Log in to vote
0
Answered by
aredanks 117
4 years ago

The MouseButton1Down event cannot be used with an ImageLabel as it does not have that event. It is not meant to be a button or clicked on.

To fix that, use an ImageButton which is clickable. TextLabels also cannot use MouseButon1Down but TextButtons can for future reference.

Answer this question