Would this not fix your issue? If you connect the changed event to each selection when initialised?
local currentlySelect = workspace['PLUGINPart_DoNotRemove_1a2b3c4de5f6']
local function getObject(gui)
local obj = Selection:Get()[1]
if obj == nil or not obj:IsA('Part') then
return
end
GetSize(obj, gui)
currentlySelect = obj
return obj
end
local gui = script.Parent.ScreenGui
gui.Parent = game.CoreGui
gui.TextLabel.Text = 'TEST'
Selection.SelectionChanged:Connect(function()
currentlySelect = getObject(gui)
currentlySelect:GetPropertyChangedSignal('Size'):Connect(function()
GetSize(currentlySelect, gui)
end)
end)