hi, I’m making a plugin that requires you to click parts, but because of this, studio automatically makes you select the part. How do I disable the Select, Move, Scale, and Rotate tool?
All you need to do is:
game.SelectionService:Remove(game.SelectionService:Get())
Then just make sure obviously that the :Remove
function is on a pcall, since a player could be selecting something that isn’t locked. And also check to make sure Get() has something.
Example:
local SelectionService = game.Selection
-- Makes sure :Get() isn't just {}
if next(SelectionService:Get()) ~= nil then
local success, err = pcall(function()
return SelectionService:Remove(SelectionService:Get())
end)
if not success then
warn(err)
end
end
I’ve fully tested it. Remove will not destroy it, it will unselect the actual part/object