How could I see mouse target in studio?

Hi, so like I am making a plugin but I need to check what the mouse has selected for example the mouse has a part selected I need to know that its selected but how? Since I don’t think I can get the players mouse since I would need to check when the player has entered the game, please help.

You can use the Selection service to check what instances the user has selected, with the :Get() method, which returns an array of instances like GetChildren

Here is an example:

local Selection = game:GetService("Selection")

for _, object in Selection:Get() do
	print(object.Name)
end