PluginMouse won't react to Events?

Hello there!

I need help for my script. This script used to be the main script for my new plugin, but something is not working. For me, the script works like it should be, but for my friend the script isn’t working? (Only the getmouse part isn’t working!) So what did i do wrong?

The script:

plugin:Activate(true) 
local toolbar = plugin:CreateToolbar("Examples")


local AddTex = toolbar:CreateButton("Example", "Example", "rbxassetid://0")

local Enabled = false

local Effect = script.Parent.SelectionBox

script.Parent.Parent = game.CoreGui


local mouse = plugin:GetMouse() 


mouse.Button1Down:Connect(function()  --Not working
print("Clicked")
end)

hm, according to the developer wikipedia, it says,

GetMouse returns a PluginMouse that can be used while the plugin is active through Plugin:Activate .

i have no clue with plugins, but maybe put plugin:Activate() before getting the mouse?

also, try highlighting all the parts of your script then you can click the symbol that looks like </> this which will make your script into codeblock, making it easier for others to read scripts

1 Like

It doesn’t work, If i put the plugin:Actiavte() to the end. It only works when I publish it again

He said to put it before getting the mouse, not at the end.

2 Likes

Oh ok, my bad sry! I will try it, if it works.

It’s still the game, but I know what doesn’t work! The Problem is that the Button1Down()