local selectionService = game:GetService("Selection")
local get = selectionService:Get()
if get then
print("true")
end
This works fine for me and your code should work unless you wrongly defined selectionService. You can even test the code with the command bar by having something pre-selected before running it.