学习
引擎类
ObjectValue

*此内容使用人工智能(Beta)翻译,可能包含错误。若要查看英文页面,请点按 此处


概要
继承成员
代码示例
对象值示例
local objectValue = Instance.new("ObjectValue")
objectValue.Name = "MyBaseplateReference"
objectValue.Value = workspace:FindFirstChild("Baseplate")
objectValue.Parent = workspace

API 参考
属性
Value
读取并联
模拟访问权限
ObjectValue.Value:Instance

活动
Changed
ObjectValue.Changed(value:Instance):RBXScriptSignal
参数
value:Instance
代码示例
对象值已更改
local objectValue = script.Parent.ObjectValue
local part = script.Parent.Part
local function printObject(object)
print(object:GetFullName())
end
objectValue.Changed:Connect(printObject)
objectValue.Value = part

changed
已弃用

©2026 Roblox Corporation、Roblox、Roblox 标志及 Powering Imagination 是我们在美国及其他国家或地区的注册与未注册商标。