Add Instance as a Valid Attribute Type

Personally if I need to easily find a part associated with another instance I use a Weld (or some other joint) with Part0 (and only Part0) set to the target part and then use that weld to find that part, but this still feels like a very cheesy getaround and I wish we could just save instances inside an attribute

1 Like

Really is kinda crazy how this isn’t implemented yet - it feels like the whole point of adding the attribute system was to supersede (but not deprecate) the common practice of making a folder full of ValueBase instances, yet somehow we’re over 2 years since this feature was released and you still have to use ObjectValues and store JSON encoded strings for tables. This should not be at all a difficult feature to implement.

3 Likes

I think it might have something to do with how a nonexistent attribute gives the same value from :GetAttribute as an Instance attribute that is not set.

The delay says otherwise.

4 Likes

I believe its not added yet because, luau has only one type of “undefined”

For example, I set an attribute of an object to reference an object, How would I know if the attribute is saying nil or just completely nothing?

1 Like

Having to make ObjectValues well using attributes is very annoying, this would be awesome.

6 Likes

Why is ROBLOX not adding this? We need it!

6 Likes

Yeah, this would be extremely useful for many different reasons. Here’s hoping that Roblox adds this soon.

1 Like

Many people seem to want this, it’s a no-brainer to add tbh

1 Like

It really isn’t. Since things can’t have a default instance it would be impossible since when an attribute is nil it’s gone.

good idea and i support, but what about attribute dictionaries/tables

That wouldn’t be practical. That’s why bindables exist.

attributes can be replicated and having tables being replicated with ease is a good feature

They’re saying that Instances aren’t valid attribute types yet because the way that would function would conflict with the current way the system works

They could make it different for attributes, as someone mentioned above

Two years of feature apparently being implemented and disabled due to nobody wanting to take care of ui…

5 Likes

Support! I sometimes need attributes for stuff that has to be visible to multiple scripts at once.

Having to use a ObjectValue feels a bit… let’s just say that it’s really distracting. It feels weird when you’re already used to using attributes for shared information and it makes lines of code longer.

1 Like

I’d really like this to be added! Sure would make everything more convenient instead of having to make multiple attributes to get the values I need

My only question is why is this still not a feature (:

Absolutely not. Having two values that mean nothing is a horrible decision. (see JavaScript with both undefined and null)

bump, this is still super needed

1 Like