I tried to do just a simple code, which works for the most part
for i,v in pairs(workspace:GetDescendants()) do
if v:IsA('BasePart') then
v.Locked = true
end
end
The rest of the script just unlocks certain things (none of which would select a player). Am I missing something? Probably something simple I'm just totally overlooking but appreciate the help.

5 comments
I had already tried this and I had used playeradded before, but it doesn't seem to work correctly still. This is why I was wondering if there was an issue with those lines of code themselves, where they wouldn't act on players. When going in and viewing properties of the parts within the player, they are still not locked.
alright, but players are already locked tho
But the locked property is not enabled? When testing the game, it was still possible to modify players with tools that check for this property.
check it on the server, its locked
Also edited it should work now