How do I detect when a plugin is clicked

Hello,
I am currently creating a plugin and I require a plugin button to be pressed in the toolbar. I expected this api reference article to work but I don’t know if I’m not doing it right or if I’m using the wrong command.

These are some scripts I tried:

PluginButton.Click(function()
print(“Clicked”)
end)

PluginButton:Click(function()
print(“Clicked”)
end)

Thank you in advance for any help. :roblox_light: ICrann

PluginButton.Click:Connect(function()
    print("Clicked")
end)
1 Like

Thank you very much,
I probably should have guessed I would have to put in connect as so many functions use it.
ICrann