Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

?MouseButton1Clicked - Confused on Behavior

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!

2 comments

0

Try using MouaeButton1Click instead.

0

please post a answer so i can accept it

2 answers

✓ Accepted answer

Try using MouseButton1Click instead (resent as answer)

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

This discussion is preserved as it was. New answers, comments, and votes are closed.