[Feature] Private / Script-locked object properties and descendants

Currently in Roblox, it is quite easy to make the mistake that is accidentally modifying an object’s properties (such as a part or a weld’s CFrame, reparenting / destroying an object or changing a property that other scripts may rely on).

In some game engines, object properties are restricted or set to private and can only be modified by the object itself or any script/code that is present within the object.

The existence of such a system allows for developing games that are more secure and “correct” and where errors or bugs are easier to find.

It also prevents one game object from directly modifying the state of another object.

Example

When a system like this is utilized, if the developer wishes to code a sword that deals damage to a zombie for instance,
a BindableEvent or BindableFunction must be used instead, present inside of the zombie that will invoke the zombie’s script to subtract it’s own health points.

Some descendants inside a model or actor may be configured to be exempt from being private/locked to make communication between objects and scripts through values or attributes possible in case the developer wishes to use something else than BindableEvents or BindableFunctions.

Security

On top of this, if a game utilizes free models or 3rd party scripts, finding problems such as a random script modifying game objects or altering them in ways that break other scripts shall be way easier to identify while also providing more protection against malicious code.

Script-locked objects do not only protect variables from outsider modification but can also protect the object from having descendants added or destroyed without permission, further preventing random things from breaking or causing bugs.

This feature essentially also protects the developer from themselves and their own mistakes since scripts will throw an error if they modify an object that is private / locked.

Closure

And finally, this feature is entirely optional, therefor developers who aren’t comfortable with it don’t have to use it.
It can be enabled or disabled on a per-object basis and is not on / off for the entire place/experience.

It’s more like a flag or a property (perhaps service) that can only be switched on in Studio.

If Roblox is able to address this and consider this feature it could greatly help with building organized, structured and robust experiences with as little bugs and potential flaws and errors as possible.