You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to add more configurable states in the humanoid
EX: Attacking, Sprinting, Crouching, …
What is the issue? Include screenshots / videos if possible!
I’m not sure what would be the best way (efficient)
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried making them with bool and other values inserted in the hum, and configure them with local and/or server scripts inside the corresponding values (to make it easier for future change)
I searched the dev hub, but no results…
*I am a semi-advanced scripter, so I can understand more easily, no example code required if you don’t want to make it
i just like to keep a folder in the character, maybe two if you need to separate the objects to avoid automatic replication. this way works well if you’re planning to have NPCs too
and for general player data, since players retain the data through the lives of their character, i keep that within a database in ReplicatedStorage
Yes, that is a good organization idea. Though, I will have multiple skins for characters that could potentially have different states based on other external factors.
Now here’s what I’ve done:
Replicated Storage:
Characters:
Skin1.Humanoid:
Crouching (BoolValue)
Now whenever I load the character (via my custom loader) I replace the “Crouching” value with whatever the original state value is.
(That value is acting like a placeholder)
But I’m still not 100% happy with it, as if I change the name of it, or misspell a letter, it errors or doesn’t find the placeholder.
I’m thinking of making a module script with all the custom states and configuring them there, adding the states as an Enum, but I’m not sure how to implement both client and server side…
Or maybe by adding tags in the humanoid could work, I’ll try tomorrow a workaround.