Skip to main content
Sets a Roblox property with reflection metadata. The first argument must be Instance object, the second argument must be a string property name, and the third argument must be present. The instance reference must be valid. If the property descriptor is missing from Roblox property metadata, the function returns nil. If the descriptor exists but does not resolve to a property entry, it raises “Not a property”. Bool values use luaL_checkboolean. Int and SystemAddress values use integer type checking, with SystemAddress writing RemoteId.PeerId. Float and Double values use number type checking. String, SharedString, and BinaryString values use string type checking before calling the setter. For other property types, the function temporarily calls setscriptable(instance, property, true), assigns instance[property] = value with normal Lua field assignment, then restores the original scriptable state with setscriptable(instance, property, isScriptable). On successful writes, the return value is a boolean equal to !IsScriptable() from before the write.

Syntax

Argumente

Rückgaben

Beispiel

Set a property value even when normal script access is limited.