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

Mouse1OnClick does not work when Clicked?

Asked by 5 years ago

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)
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 SummerEquinox 643 — 5y

1 answer

Log in to vote
0
Answered by
danglt 185
5 years ago
Edited 5 years ago

You did not use a Connect

script.Parent.MouseButton1Click:Connect(function()
    print("Test")
end)
0
Oh, I see! Thank for answering. GabrielDeaf 4 — 5y
Ad

Answer this question