I’d like to add a “Lock All” button aswell, here is my reasoning:
A lot of exploiting tools recently allow people to spawn and give hopperbin build-tools to move, delete and copy parts, Locking all parts in a game is a simple way to start preventing that.
It’s not exactly an “Anti-Exploit” thing, but I want to easily be able to lock and unlock my place in studio, i’d much prefer my place’s parts locked if it keeps the dumb hackers from doing anything.
Probably relevant, but not a good practice for quality development where you lock parts to filter the ones that shouldn’t be moved by accident.
Here’s a script though:
local function Scan(ch)
for _, obj in pairs(ch:GetChildren()) do
Scan(obj)
if obj:IsA("BasePart") then
obj.Locked = true
end
end
end
Scan(game.Workspace)
…Aaaand others beat me to it
Running this code when a game session launches would be a cleaner solution than locking everything in studio.
This is the first thing I made with plugins when plugins were first introduced. I still use it all the time, it would be nice to have it as a studio feature seeing that we already have the unlock-all button.