I'm trying to find the mouse of the player inside a plugin Does anyone know how to get the mouse of a person who pressed a plugin?
local plugin = PluginManager():CreatePlugin() local toolbar = plugin:CreateToolbar("test") local button = toolbar:CreateButton("test", "test", "test.png") button.Click:connect(function() mouse = GetMouse() mouse.Button1Down:connect(function() --This isn't working print("Button 1 pressed from PluginMouse") end) end)
Plugin manager is no longer required as Plugin is a global keyword even though it recognizes it as a unknown global use
local Mouse=Plugin:GetMouse()
to get the mouse but you have to test it as a regular function for it to work.