Plugin Button1Down not working?

I’m working on a plug-in at the moment and for some reason Button1Down isn’t firing when needed?

local plugin = PluginManager():CreatePlugin() 
local Mouse = plugin:GetMouse()

Mouse.Button1Down:Connect(function()
	print("Test")
end)

Despite this not working, Mouse.Hit.p does.

1 Like

You need to use the original plugin keyword, but you’ve override it with a variable which won’t return the mouse. Plus, you shouldn’t even be using that since it’s deprecated now:

2 Likes
local plugin = PluginManager():CreatePlugin() 
plugin:Activate(false)
local Mouse = plugin:GetMouse()

image
https://developer.roblox.com/en-us/api-reference/class/PluginMouse

2 Likes