I’m currently using ReflectionService to obtain an instance’s properties before attempting to change them if the script has the ability to write to them. There does not seem to be a way to know if my current script has the ability to do that or not.
I’ve been attempting to use SecurityCapabilities.fromCurrent():Contains() to see if the script has the capabilities to write to the properties, however, when Sandboxed is not toggled, SecurityCapabilities.fromCurrent() returns a SecurityCapabilities that contains all capabilities up to CapabilityControl (which is the highest capability there is excluding RobloxEngine and InternalTest).
Thats obviously not true since if I actually tried to write to a property that requires CapabilityControl, it would error
Also if anyone could confirm or deny this, is SecurityCapabilities.fromCurrent() actually supposed to return a SecurityCapabilities that contains CapabilityControl on any non-Sandboxed scripts? (the command line as well) This doesnt feel like intended behaviour since its obviously not accurate to the actual capabilities of whatever script it runs in but theres literally no documentation for SecurityCapabilities so I can’t tell for sure.
(Error that happens when attempting to change a property that the script lacks capabilities over)
![]()
The result of printing SecurityCapabilities.fromCurrent() literally anywhere that isnt sandboxed
![]()