New Studio Beta: Attributes!

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

This is the ultimate ratio to the absolutely useless Configuration object. I’m extremely glad this has finally been released.

8 Likes

This is awesome! Our codebase is currently filled with modules for settings and other configuration values. This will simplify and consolidate them all. Thanks!
image

20 Likes

I suppose my only immediate request is the ability to create attribute categories as well so that all of my attributes aren’t thrown in one place.

Aside from that, this is something I have been waiting on for a very long time, especially as someone who has relied on wrappers for Instances simply to store properties for several years now.

For me, having Instance references is very important. One example in one of my games is a turret. It targets a specific model instance. While it is possible to use something like Vector3 for this purpose, it’s often far easier to see "Oh, the turret is targeting workspace.Enemies.Enemy392" instead of where it’s targeting. The same thing occurs for enemies, they target a player character model. It would be far easier to be able to reference the model directly rather than having to use some script magic to constantly update a Vector3 attribute for position. Doing runtime edits of the NPC’s behavior based on simply changing the target model would be possible (whereas if a script were managing a Vector3 value, I couldn’t do that).

And of course, an appropriate reaction to this long-awaited feature

38 Likes

I’ve been waiting for attributes for a very long time, excited to see them finally in beta. Though, I do have a few questions.

  1. Do you plan to support Instance types? I pretty frequently need to link instances together, for example marking wheels on a car chassis.

  2. Do you plan to support dynamic length arrays? I frequently also use arrays whenever configuring my objects.

  3. Whenever an attribute is applied on a package, it changes to all packages. Is this intended behavior? If so, do you have plans to be able to change this behavior, as I would like to be able to configure values for packages per-instance while only replicating changes to the actual attribute name/type.
    This is probably my largest use case, so I was quite disappointed when I noticed this.

13 Likes

Thank you! Wish you guys told us about the limits tho. (Not Name)

4 Likes

This is a BIG deal, and will significantly change how I write code in the future. Can’t wait for this to go live! A very exciting feature.

I think this is the closest thing we have to true classes… stick a stringValue/Folder in and give it attributes and you have a custom instance ;D

5 Likes

The first thing that comes to mind is CFrame. Although it is a bit older, it still ends up being fairly useful, particularly for all-in-one position/rotation storage. Or perhaps its stored as a different type behind the scenes and is already compatible? Maybe this has something to do with tables not being storable with attributes.

Also, please add support for UDim3 and AFrame.

6 Likes

Will there be a way to determine if an attribute value doesn’t exist, or if it is nil? Probably doesn’t make sense, so let’s use the Parent property as an example. Instances can be parented to nil, in that case instance.Parent == nil. But it doesn’t necessarily mean the property isn’t part of instance. Will there be a way to distinguish nonexistent vs properties that can be nil?

I know only these are supported for now, but I am definitely sure Instances will be supported eventually.

And some instance properties can be nil.

8 Likes

Woah amazing! I literally just set up something that could have been done better with attributes, but I’m hyped about these being released. They’re finally here, thank you ROBLOX! :partying_face:

3 Likes

Super excited to try this out. I currently have modules which replicate this behaviour using folders and Value objects. One thing that’s missing here is an Instance type. I frequently find it useful to give my game objects references to other game objects and so this would be a showstopper for me.

E.g. giving a game object a reference to:

  • The Player who owns it
  • The “next” object in a series (e.g. for building skill or item unlock trees)
  • Various other game-specific reasons a game object needs a reference to another game object
6 Likes

One bug I’ve noticed (at least I think it’s a bug).

  1. Attributes don’t show up if you search for it in the properties tab. And…if you change something in the properties tabs while searching for attributes, it randomly pops up.

Yes, I can reproduce this multiple times.

20 Likes

Would be kinda neat to just have an empty GameObject or DummyObject or something like Unity has so that we can have entirely custom attributes on a game object without having to put them on an existing object type

31 Likes

Super excited about this release, have been waiting for it for a long, long while. In the future will there be support for constraining number values for floats and integers, and also will there be support for setting attributes equal to tables?

A cool side idea is if we had the ability to create instances of the type “empty”. It would by default have no properties and we would be able to add attributes to it. Just an idea, but again this release is awesome!

9 Likes

This is what developers have been needing for a long time. Thank you!

3 Likes

I second this! I would love to see “empty” instances that we set attributes for.

6 Likes

When will it fully release, is it ok for me to use beta features for my actual game?

This feature will be a big help for me! Thanks!

1 Like

Roblox just added custom object. Holy cow.

4 Likes

I love you. I can’t say anything but that. I have been waiting for this for AGES!