UI elements become permanently selected with the rectangular selection box

This bug has been bugging me (ha) so I decided to make a temporary fix until it is officially fixed.

local Selection = game:GetService("Selection") 
local StarterGui = game:GetService("StarterGui")

local function fixSelections()
	local currentSelection = Selection:Get()

	Selection:Set(StarterGui:GetDescendants())
	Selection:Set({})

	Selection:Set(currentSelection)
end

fixSelections()

Paste that into the command bar when you want the bugged selections to go away.

Since Idk which selection is bugged I simply select everything in StarterGui, deselect it, and then select what you originally had selected. Which is a hacky way to fix this particular selection bug.

Made a quick plugin for this as well:

Edit: If you want to also include workspace for Surface guis:

local Selection = game:GetService("Selection") 
local StarterGui = game:GetService("StarterGui")

local function fixSelections()
	local currentSelection = Selection:Get()

	Selection:Set(StarterGui:GetDescendants())
	Selection:Set({})
	
	local objects = game.Workspace:GetDescendants()
	local objectsToSelect = {}
	for _, object in objects do
		if object:IsA("GuiBase") then
			table.insert(objectsToSelect, object)
		end
	end
	
	Selection:Set(objectsToSelect)
	Selection:Set({})

	Selection:Set(currentSelection)
end

fixSelections()
4 Likes