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

Mouse1OnClick does not work when Clicked?

Mouse1OnClick doesn't work for me when I clicked on the button. I did very simply, but it did not work. My script was stored in, StarterGUI --> ScreenGUI ---> Frame --> Button --> Script. The print did not output in the Output Page.

script.Parent.MouseButton1Click(function()
	print("Test")
end)

1 comment

0

Other than Prismatic's answer - if you are having trouble understanding usage or have questions about why you need to use Connect -- it is much more visible in named functions rather than anonymous ones. https://hastebin.com/nodifenavo.sql

1 answer

✓ Accepted answer

You did not use a Connect

script.Parent.MouseButton1Click:Connect(function()
    print("Test")
end)

1 comment

0

Oh, I see! Thank for answering.

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