Unable to get mouse position when plugin is deactivated

I am currently working on a plugin that highlights a surface but i noticed i cant use any roblox tools or the plugin will simply break for some reason.

I want to use the plugin while using one of the roblox tools so i can easily select a part in the viewport frame and highlight the surface according to the mouse position.

Is there a way to get the mouse position while using the studio roblox tools via the plugin?

1 Like

I think you can use the SelectionService with Selection:Get() and it returns a table of everything that is selected in the explorer tab, consequently when you use the Roblox Studio’s default tools.

Using that you can loop through the instances and put a Highlight on each one.