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

?MouseButton1Clicked - Confused on Behavior

Asked by 4 years ago

Hello. I have been trying to make this work for a day, and it's just not working. Here is the script. It's a script, not a localscript.

script.Parent.MouseButton1Clicked:Connect(function() -- Here is the error, MouseButton1Clicked is not a valid member of TextButton
    script.Parent.Parent.Parent.hm.Visible = true
end)

Can someone tell me why this is happening? Thanks!

0
Try using MouaeButton1Click instead. Jack_AviationRBX 25 — 4y
0
please post a answer so i can accept it iiDkOffical 109 — 4y

2 answers

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Try using MouseButton1Click instead (resent as answer)

Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

well the event your looking for is called MouseButton1Down, not MouseButton1Clicked

script.Parent.MouseButton1Down:Connect(function()
    script.Parent.Parent.Parent.hm.Visible = true
end)

you can also use MouseButton1Click, it's similar but the event bounds later

source

Answer this question