Greetings!
I will try to solve 2 problems into 1 topic.
Copying the HumanoidDescription of LocalPlayer to NPC
I’ve tried to do this by myself but sadly i have no idea from where to start or how to start.
To begin with i tried to get the client’s user and print it out in output .
local LocalNPC = game.Workspace.LocalNPC.Humanoid
local char = LocalNPC:WaitForChild("Character")
local player = game:GetService("Players")
local LocalID = player.LocalPlayer.UserId
print(LocalID)
game.Players.PlayerAdded:Connect(function(player)
print(player.UserId)
LocalNPC:GetHumanoidDescriptionFromUserId(player.UserId)
end)
Script in ServerScriptService
Basically all i want to achieve in this section is to get the player’s look to be copied and pasted into the NPC’s look.
Copying player friend’s look in NPCs
I want so the selected NPCs to have the look of the user’s random friends basically but , as i said, i don’t know how to start and from where to start.
User’s model is called LocalNPC and the friend models are LocalFriends
First off, you have to apply a HumanoidDescription to a humanoid, and to get the player’s HumanoidDescription, you have to call GetHumanoidDescriptionFromUserId() which is a function of the players service, not humanoids. So you just have to do this.
As for getting the player’s friends, you should consider players:GetFriendsAsync(). Here’s the documentation in the developer hub. I never used this function before, so I can’t really help you out further. Still, you should consider looking into this.
It works but i have a different problem now. I want the NPC to respect the Height, Depth , HeadScale and so on from the original dummy.
Before / After loading the description.
I tried to copy all the scales from the loaded avatar and edit them. I’ve also tried to edit them from the script and i get the error " ~ ~ ~ is not a part of Humanoid" with each scale.