New Studio Beta: Attributes!

This topic was automatically opened after 8 minutes.

THEY’RE FINALLY HERE


Been waiting over a year for these to officially get enabled, guess I don’t need these settings now haha.
image

also f in chat to valuebases, assume this will supersede them :pensive:.


A small feature request would be the ability to write protect attributes from the client, since they seem to follow the same replication logic as CollectionService

Stop me.
image
(dw im using an elevated plugin, your security does actually work)

145 Likes

THANK YOU for finally releasing this!
It is extremely useful for cleaning up my objects and scripts without values!

wait a second, how many types can we pack in them?!

36 Likes

Yes! This is definitely going to improve my developing experience because I don’t need to use values as often anymore! Thanks for the continued support of improving developer workflow.

13 Likes

Are there plans to allow enforced integer attributes (as opposed to doubles), like IntValues’ .Value properties?

31 Likes

Questions:

  • Is there a limit to how long the string can be? (250k characters)
  • Is there a limit to how many Attributes an instance can have?

Request for data type support:

I would like these Data Types to be supported by Attributes

0 voters

Notes:

  1. It is perfectly fine if Attributes can not support Mixed Table and Array with gaps (although we’d still love for it to be capable)
  2. TweenInfo can’t be sent through the Network (as easily) so this would be a nice alternative


image

GetAttributeChangedSignal


Make sure to fix that link


SetAttribute


I am so happy!


Feel free to take AttributeService I have added 7 functions for more functionality to using Attributes check it out to learn more!

44 Likes

Oh my god! :sob: this is… this is… GREAT!!! THANK YOU!!!

14 Likes

Amazing! What’s the difference between this and simply adding a type of value object inside the object? Is this more efficient?

8 Likes

Woah, this is awesome. I’ve always wondered when these methods would be enabled and anticipated it. (I’ve seen them in the Roblox wiki for so long.) This is going to be a lifesaver with a lot of situations. I can’t wait until this is released fully and I can move to this kind of workflow. Question: Are we going to get more data types? Like tables/objects for instance. haha pun

12 Likes

I was literally waiting so long for this feature that I had given up my hope in hyping them up, and now I am finally glad they’re here. This is going to motivate me big time.

I have a lot of use cases for attributes, including their replacement for ValueObjects. For example: I can use this to set a player’s membership/access status with an attribute over a module which just makes things so much cleaner and accessible in my perspective. I can also use them as sorts of data holders (of course assuming the client can’t propagate changes under any condition). Another use case for them is to customise NPC types/behaviour but still have them all run with a single script.

Really excited to get down to using these. They will help a lot in development.

Any plans to support tables? One of my use cases was to use attributes on a player as a substitute for creating folders of player data. This way, I just need to access their data attribute and then write any changes I want, while the client can check on these changes and update their UI accordingly.

30 Likes

Epic… This will definitely make workflow way more easier and efficient. :open_mouth:

8 Likes

(post withdrawn by author, will be automatically deleted in 1 hour unless flagged)

7 Likes

Less clutter as its suppose to superseed needing Value Objects.

8 Likes

Ah I see. Well, when this gets publicly released, I cannot wait to use this on my future projects. Thanks ROBLOX!

7 Likes

I don’t find this any useful unless I’m trying to avoid value objects.

7 Likes

A much asked request delivered. Thank you and the amazing engineers for pushing this out for us!

8 Likes

This is awesome! I remember first seeing this in the release notes so long ago, and I was wondering when they were coming out, but they’re finally here.

But, I found a bug or intended behavior that should be changed. When getting non-existent attributes such as “Other,” it doesn’t return nil, at least when printing it directly. This can make it extremely hard to debug code since this would be like shoving the mistake under the rug instead of outputting nil.

I expected this to work like FindFirstChild that straight up returns nil inside, without having to store it in a variable.

Some Features

First, I think we should be able to change the data type of the attribute, perhaps, by adding to this drop-down?

image

Second, some datatypes to consider adding are:

  • float - the properties widget adds a slider to float properties, so this should happen as well for attributes
  • Instance - be able to link objects together, e.g. set a frame’s “CloseButton” to an image button whose name can be changed anytime, but the attribute can return the instance itself without having to rely on the name

Lastly, it’d be amazing if the TweenService can support attributes! It is very powerful with properties, but if numerical and color attributes can be tweened, then it’d make this very powerful.

Again, thank you so much!
I do not mind the wait whatsoever, these things are godly!
Keep it up, Roblox! :roblox: :roblox_light:

42 Likes

(post deleted by author)

9 Likes

This is amazing! It’s a shame that it doesn’t seem to support tables, but that’s a fairly minor thing anyways. The main thing I’m disappointed about is that the attributes can’t be indexed like properties. You have to use a function to access it.

Also, I noticed that when entering a negative number into a NumberSequence attribute, it shows this:
https://i.gyazo.com/a3ea5d5a3d6731ebcdd0cbb5bdea68f3.gif

11 Likes

This is an amazing feature now we will no longer need a bunch of child values inside of tools or parts and make it a lot easier for customization
Question: Can you define them like Gun.ReloadSpeed

I’m sorry if its already there but I’m on my phone

9 Likes