[Studio Beta] Reference Instances Directly with Attributes
Key Takeaways
Attributes can now reference instances with the new InstanceHandle type. This lets you point an attribute at another Instance directly with the new InstanceHandle type, so you no longer need a separate ObjectValue child.
Find it now in Studio, no setup required.
Hey Creators,
We’re launching Instance attributes in Studio beta. You can now point an attribute at another Instance directly instead of relying on a separate ObjectValue. This works through a new engine type called InstanceHandle.
Screenshot 2026-07-08 at 1.14.48 PM1920×873 93.2 KB
What’s new?
Attributes let you store your own data on an instance, a number, a string, a Vector3, and so on. Until now, attributes could only hold plain data. If you wanted a part to point at another part, you had to add an ObjectValue as a child to hold the reference. Now an attribute can point at another Instance directly:
local part = script.Parent
-- Point an attribute at another Instance
part:SetAttribute("Target", workspace.TargetPart)
-- Read it back
local handle = part:GetAttribute("Target")
local target = handle:Wait() -- the Instance, or nil if it isn't available right now
if target then
print("Target is", target.Name)
end
You pass an Instance to SetAttribute and it’s stored for you. When you read it back with GetAttribute, you get an InstanceHandle (not the Instance itself – see below). Call Wait() or Get() on the handle to grab the actual Instance.
Why a Handle Instead of the Instance
The short answer is replication. Sometimes, the Instance you’re pointing at might not exist on a client yet. If GetAttribute returned the Instance directly, it would have to return nil when the target isn’t around. But nil is also what you get when the attribute doesn’t exist at all. Those are two different situations, and you’d have no way to tell them apart.
InstanceHandle keeps them separate:
• The attribute doesn’t exist → GetAttribute retu…