How to make NPC look like a player's local model

So i’ve been having a problem for the few past days that I just couldn’t fix, I searched everywhere for it but it’s a really specific thing, So I waited untill I could talk here in the Roblox Developer forums.
I need to make an NPC/Model look like a player who joins the game for a main menu.

I’m currently using a humanoid description script, the problem is, I can’t find a way to make it so that the script tries to find a local player and not a user ID

I have even tried the a GetCharacterAppearanceAsync script but I was having the same problem, because instead of it being an ID, It was asking me for the name of the player I want to put for the model.

111

Thanks!

4 Likes

You just simply have to get the LocalPlayer’s user id.

local userId = game.Players.LocalPlayer.UserId
local desc = game.Players:GetHumanoidDescriptionFromUserId(userId)

char.Humanoid:ApplyDescription(desc)
1 Like

To make it work for the LocalPlayer, just use the LocalPlayer’s User ID

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local desc = Players:GetHumanoidDescriptionFromUserId(LocalPlayer.UserId)
3 Likes

The “LocalPlayer’s User ID” is my ID right?
(Sorry if this is a dumb question)

Yes. It is your user id (or whoever is playing at the time)

1 Like

The local player’s Id can be accessed through LocalPlayer.UserId

1 Like

Hey,

where should I apply this script?

Thanks.