EnumValue

I was thinking an instance called EnumValue would be a great addition.

Properties:

EnumValue ClassName Name Parent Enum Value Archivable

You could choose a desired enum from a dropdown list through the properties. The Value dropdown list would change accordingly to the Enum property. So for example, you set Enum to NormalId, the Value property contains Top, Front etc. Let me know what you think.

5 Likes

And what practical use would this be?

To me, it’s much easier to do it via script.

@Jon
What kind of Purpose does it has to have StringValue or IntValue ? I can also do this using a script.

@OP
Support for a Enum value.

3 Likes

Just use a StringValue. The only reason you would actually need the actual Enum value itself is if you’re using it in some sort of conditional statement. If you’re just using it as configuration, a string would still work fine.

I’m kinda in the middle whether or not I think this should be a thing. I feel like we’ve been fine thus far without it. Then again, it would be kinda cool I guess?

[quote] And what practical use would this be?

To me, it’s much easier to do it via script. [/quote]

Yeah, you can do it with a script indeed. But with an instance you can keep your game organized instead of having a mess in your scripts. Custom properties and behavior can be added easily to models and parts and whatnot.

[quote] Just use a StringValue. The only reason you would actually need the actual Enum value itself is if you’re using it in some sort of conditional statement. If you’re just using it as configuration, a string would still work fine.

I’m kinda in the middle whether or not I think this should be a thing. I feel like we’ve been fine thus far without it. Then again, it would be kinda cool I guess? [/quote]

Good point, that should work just fine really.

I personally think we need CFrameValues.

Uhh, we’ve had those forever.

To be honest, what we really needs is IntValues.

To be honest, what we really needs is IntValues.[/quote]

Eh… Is the Advanced Objects window a new thing for you guys… IntValues have been around forever…

Do any other objects have this sort of behavior, you change one and it affects another in the properties window? Aside from that point I am curious why you need a value to do this and what it’s actual application would be since you haven’t really specified any use case where this isn’t already possible.

No. I think it’s really gross.

Ok I can, So at this very moment Im creating this building game, im making a feature where you can change color and material, I have it so when the block place its the color and material of the value in playergui, but you can’t do it for materials. Even using string value its not gonna work. for the color you can use the color value but there’s nothing for material

use a StringValue and do Enum.Material[StringValue.Value]

1 Like

I like what you getting at but I did that to, and how my code is, it comes out nil for a sec to load the block because its on a limited grid so that code gives me a error. But im thinking of creating a part in side a playergui and have them assigned to that.