I’m currently developing a Plugin and i ran into this problem that the i cannot get the Plugin Mouse using plugin:GetMouse()
, also i read the documentation of PluginMouse and i needed to activate the plugin by typing plugin:Activate(true)
and it still doesnt work…
plugin:Activate(true)
local PluginMouse = plugin:GetMouse()
ToolsFrame.LinkLanes:GetPropertyChangedSignal("Visible"):Connect(function()
if ToolsFrame.LinkLanes.Visible then else return end
if Options._Development["Linking Lanes"] then return end
Options._Development["Linking Lanes"] = true
print("linking") -- actually prints when LinkLanes frame gets visible
local SelectLane = ToolsFrame.LinkLanes.Frame.SelectLane
local Cancel = ToolsFrame.LinkLanes.Frame.Cancel
local FirstClick = nil
FirstClick = PluginMouse.Button1Down:Connect(function()
local Target = PluginMouse.Target
print(Target) -- doesn't print
if Target then else return end
if Target.Parent.Parent == workspace:FindFirstChild("Nodes") then else return end
print("Is a node lane")
end)
end)
Also wrote this one if you think the first one is too confusing:
plugin:Activate(true)
local PluginMouse = plugin:GetMouse()
PluginMouse.Button1Down:Connect(function()
print("Button down") -- doesn't print
end)
also i just noticed it does work while the plugin loads and i there is no tool selected (Select, Move, Scale, Rotate)