Sure,
A lot of the code is needless, its definitely in a rough state. And I offer no warranties haha
Sure,
A lot of the code is needless, its definitely in a rough state. And I offer no warranties haha
Any time estimate on features for NPCs? Deciding if I should do a custom implementation or wait for official Roblox API
Apparently, whenever the game encounters a HumanoidDescription with a âContent Deletedâ item, it just ends up not loading the character at all.
In this instance, Iâm trying to load in a specific user, but this user is wearing a moderated shirt so I cannot load in that character at all until he or she updates his or her avatar.
Instead of handling the exception in a game that relies on this mechanic, it just ends up throwing an error stating that âHumanoid::ApplyDescription() Assets are incorrect for the Humanoid Description slots they have been assigned to.â
For now, a temporary fix for the problem on my end would be to pcall the function, then if there is an error it would just load a placeholder, but I still do not get why Humanoid:ApplyDescription() cannot handle anything that is âContent Deleted.â
Some else I believe I should add: The shirt is content deleted but still visible on the user in both 2D and 3D.
I found that if I wait for at least one playerâs character to load in before trying to apply HumanoidDescriptions to an NPC it successfully applies the HumanoidDescription to the NPC. Is it safe to build my game/NPCs on top of this âbugâ, or will something be changing in the future that will break this?
The HumanoidDescription system will shortly be supporting NPCs, so you should be safe to keep doing what you are doing, and once NPCs are supported you will not need to wait for a player character to load
Thanks for the reply. I canât wait for it to be actually supported!
Also, do you know if thereâs any way to keep a set of custom â/eâ emotes while also using this system? It wonât allow me to keep a custom animation script in the game & even if I wanted to I also want to allow players to use any set of animations that theyâd like to. Not sure how to add custom emotes if the script is constantly being re-inserted.
Youâd need to edit the chat modules to do that.
Iâm pretty sure the chat modules no longer carry that functionality, it was all moved to the Animate script.
I love the new feature,
I created 64 accounts and recorded their user idâs. This gives me a library of 64 avatars that I can convert players into. The head issue has been mentioned by a few. This is where the head may not be in the right place when moving between R standards. My solution was to simply call the function a second time after a short wait. The other part of the trick was to lock the user out from calling the transform function for 5 seconds. This way the function can make clean calls without conflicts that could be generated by impatient clickers.
local module = {}
local locked = false
locked = script.Locked.Value
if not locked then
locked = true
function module.execute(player,avatar,avatartracker)
local humanoid = player.Character and player.Character:FindFirstChild(âHumanoidâ)
if humanoid then
local humanoidDescriptionForUser = game.Players:GetHumanoidDescriptionFromUserId(avatar)
humanoid:ApplyDescription(humanoidDescriptionForUser)
wait(.25)
humanoid:ApplyDescription(humanoidDescriptionForUser)
wait(2)
player.records.AvatarLast.Value = avatartracker --I have records to keep track when a player rejoins.
locked = false
end
end
end
return module
Here is a link to my game:
Once I get promoted, Iâll post sample images.
You shouldnât have to apply the description twice to get the correct behavior. Do you have an example of code which doesnât work? I can look into it and see why itâs broken.
Any ETA on when HumanoidDescriptions will be officially supporting NPCs? Iâm using a sort of hacky way right now and it causes some visual bugs for whoever the first player to join the server is.
Loving the easier way to apply bundles to players, but Iâm a bit frustrated over the non-support for decals as a shirt/pants. Still trying to find a way to bypass this.
Did you try an Image instead of a Decal? Iâm not sure if this would work because HumanoidDescriptions are pretty picky, but itâs worth a try.
I was putting in the Image ID in the Shirt/Pants section and my avatar with the HumanoidDescription had the other aspects applied, but there wasnât even a Shirt/Pants instance put in.
You will now be able to call Humanoid:ApplyDescription() on an NPC without having to wait for a character to spawn. You can also now call Humanoid:ApplyDescription() on a StarterCharacter. The 'Best Practices / Caveats` section of the documentation will shortly be updated to reflect this.
This is great, thank you.
Do we have an ETA for non-owned custom assets? I believe this is the final limitation dissuading developers from using the API.
Actually, unfortunately a bug has come up, so weâve had to turn off the functionality to use Humanoid:ApplyDescription() on NPCs until we can fix the bug. Once we have a fix the functionality will be turned back on though. I will also let everyone know here.
I appreciate the NPC support, this will make a big difference when it comes to RPGs and stuff like that.
HumanoidDescription properties like ShirtId or PantsId use the Ids that you can find on the website unlike the Shirts instance and the Pants instance which use something that I would consider as a real id⌠:s Getting a bit annoying since I have to display the shirt of the player for the character customization, but he also needs to wear it⌠Walking around with two different ids is a bit heavy