How to enable attributes?

local tri = Instance.new(“Model”, workspace)

tri:SetAttribute(“x”, 123);

16:19:05.634 - Attributes are not currently enabled

Soon :tm: :smile:

You’ll just have to wait for it to be enabled.

2 Likes

It’s WIP? Or what…

Yeah, it hasn’t been released yet. Maybe they’ll put it in Beta first before a full release? I’m not sure.

But its not out yet.

1 Like

Any other way to add some IO data to model?

I would use either value objects or the collection service to associate values with a specific instance.

1 Like

Can you drop some examples or links?

Someone else might be able to give you more information on it. I’ve found a post that has some answers that could be helpful.

At this time I’m unable to provide you much more information as I’m getting ready for work.

1 Like

Attributes can be enabled if you enable their FFLag (TheseAreMyAttributes iirc). Just be careful when working with FFlags especially if you haven’t before, because you could trip up and do something unintended and damaging.

You can enable them for Studio by using CloneTrooper1019’s Studio Mod Manager. This will allow you to launch Studio with the FFlag enabled in order to use attributes only for Studio so that you can test and prepare for attributes.

Natively without touching any FFlags, Roblox has to enable it on the engine.

8 Likes

Any idea when will they be enabled?
They seem to be a much better solution instead of creating a bunch of NumberValues inside Instances for my current project.

7 Likes

No idea! …

One hack I use for adding attributes to Instances is to just give them a Tag.
However, this only works for Boolean attributes:

local CS = game:GetService("CollectionService")
CS:AddTag(newPart, isRed)
CS:HasTag(newPart, isRed)

Another clever way to store a property is to create a TextLabel in a Part and store your property there.

myTextLabel.Text = “balloonPopped”

New Studio Beta: Attributes! :slight_smile:

1 Like