Accessories don't load on the dummy correctly when using ApplyDescription

Hello again, sorry if my posts seem frequent i’m just having a lot of issues regarding this system.

Just recently I finally managed to get the dummies to load in the viewport with some help. Awesome, I thought it’d be smooth sailing from there but when I ask the game to Apply the humanoid descriptors of the target characters, everything loads in correctly apart from accessories, which load offset from the model itself?

I don’t have any code that’d change the accessory position since i’m only cloning the dummy model and applying the descriptors on those so would anyone have any idea as to what’s causing this?

I don’t think the code is causing this but if you want to see it anyway then here:

plr = game.Players.LocalPlayer
RE = game.ReplicatedStorage.RemoteEvents.InitiateConversation

workspace:WaitForChild("PlrDummy"):WaitForChild("HumanoidRootPart")
workspace:WaitForChild("NPCDummy"):WaitForChild("HumanoidRootPart")
PlrDummy = workspace:WaitForChild("PlrDummy"):Clone()
NPCDummy = workspace:WaitForChild("NPCDummy"):Clone()
PlrDummy.Parent = script.Parent.PlayerViewport
NPCDummy.Parent = script.Parent.NPCViewport

PlrDummy.PrimaryPart = PlrDummy:WaitForChild("HumanoidRootPart")
NPCDummy.PrimaryPart = NPCDummy:WaitForChild("HumanoidRootPart")

PCamera = Instance.new("Camera")
NCamera = Instance.new("Camera")
PCamera.Parent = script.Parent
NCamera.Parent = script.Parent

print(PCamera.Name)
print(NCamera.Name)
print(PlrDummy.PrimaryPart.Name) -- Returns Nil
print(NPCDummy.PrimaryPart.Name) -- Returns Nil

PCamera.CFrame = workspace.DialougeCameraPosition.CFrame
NCamera.CFrame = workspace.DialougeCameraPosition.CFrame

script.Parent.PlayerViewport.CurrentCamera = PCamera
script.Parent.NPCViewport.CurrentCamera = NCamera

RE.OnClientEvent:Connect(function(NPC, NPCAppearance)
	print("Received OnClientEvent")
	print("NPC:", NPC)
	print("NPCAppearance:", NPCAppearance)

	NPCDummy.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(NPCAppearance))
	print("Humanoid desc Applied")
	PlrDummy.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(plr.UserId))
		-- Initiate Dialouge
end)

(ignore the comments I forgot to remove those)

I’ve found the cause:

but how would I get the attachments of the Dummy on the Right? I could just import their character but the player may change it so i’d rather not update the script every time they do so.

Scratch that, this isn’t the cause.

Maybe this?

Though i’m unsure of what difference they’re referring to. I used a plugin to import the model, not the default rig builder

Well, I replaced the dummy models with a cloned model of the Player Model and this seems to have just made it worse

its been a few hours and I still can’t think of why this is happening

sure, I could try a for loop to make a weld between the accessory and the model but i thought this was done automatically when accessories are added this way?

Does your viewport include a WorldModel? Attachments don’t work in models that are inside viewports unless their parent is a WorldModel. If you’ve done that, I suggest using this method posted quite a while ago that should still work now.

1 Like

Ah, I remember reading on this but didn’t really look into it. I’ll try do that now and come back if this works, thanks for the reply!

1 Like

This worked! Can’t believe it was that simple, thank you.

However, The left dummy only loads the Body Color and nothing else which is weird since its supposed to load my character.

any idea of why this would be the case?

Both dummies have the same descendants since the player dummy is just the NPC dummy buy I duplicated it and change the name for the script to refer to. (I don’t mean they share the exact same descendants but rather they have the exact same, the models are essentially identical with the only difference being the model name and its orientation)

1 Like

WorldModels are love, WorldModels are life. Glad I was able to help you!

I’m not entirely sure why accessories and such aren’t loading for your character in the viewport. Might be a good idea to do some debugging after apply the HumanoidDescription for the player’s character.
It worked fine for me:
RobloxStudioBeta_UWaWu1qbSy

My suggestion is instead of cloning, do it how you did it previously (when you made the post), as the clothes were working for both the NPC and the player’s characters individually (except for the accessories, which is now fixed).

1 Like

Reverted the models as suggested:


Perfect! Again, thank you so much for your help im glad i got this working now

1 Like

Glad I could help! Happy developing! :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.