PluginMouse.DragEnter not Firing?

Hello!

I want to use PluginMouse.DragEnter for detecting an object while dragging from the explorer with a plugin, then I would detect the position using PluginMouse.X and PluginMouse.Y in a loop until PluginMouse.Button1Up.

Issue

DragEnter will not fire; nothing happens when the event is connected and an object is dragged from the explorer.

Attempts

I’ve tried dragging an object, multiple objects, placing the event is both Script and ModuleScript types, connecting the event continuously, and had others run it with no luck. Additionally, there is very little to no documentation on this event, the only topic partially related to PluginMouse.DragEnter is Plugin:StartDrag and Plugin:DragEntered, which sound the same, but are totally different events.

Info

-DragEnter is the only event that is unique to Plugin:GetMouse() over Player:GetMouse().
-There are no examples of PluginMouse.DragEnter used in any case.
-PluginMouse.DragEnter is not depreciated or reserved for CoreScripts.

local Mouse = plugin:GetMouse()  
Mouse.DragEnter:Connect(function(Objects)
     print(Objects)
end)

PluginMouse

DragEnter

Plugin:StartDrag topic
https://devforum.roblox.com/t/missing-inputended-after-plugin-startdrag/4475

1 Like

Um here is an example of it used in Roblox’s building code. I’m forking it over to not be used in plugin but I’m not too sure what mouse.DragEnter really does. But Here is the only implementation if it helps.

self._dragEnterConnection = mouse.DragEnter:Connect(function(instances)
		if #instances > 0 then
			if #instances == 1 and shouldDragAsFace(instances[1]) then
				self._draggerToolModel:_processToolboxInitiatedFaceDrag(instances)
			else
				self._draggerToolModel:_processToolboxInitiatedFreeformSelectionDrag()
			end
        end
   end)
1 Like

Now That I think about it It’s probably the same as:

Mouse.Move:Connect(function()
if Mouse.Target ~= nil then 
	local instance = Mouse.Target 
	-- code here
    end
end)