How do I make the NPC get the player's appearance locally?

I want to make something like this. LSW-Avatar-Icon-Generator But I don’t know how? There are some scripts but you have to put in the id. I want the script to take the player’s id locally, it differs from player to player showing themselves.

3 Likes

Not sure what you’re asking?

You can directly reference the LocalPlayer’s appearance by looking at their Character model.

local PlayersService = game:GetService("Players")

local Client = Players.LocalPlayer
local Character = Client.Character or Client.CharacterAdded:Wait()

local HumanoidDescription = Character:WaitForChild("Humanoid"):GetAppliedDescription()

Or you can try this:

local PlayersService = game:GetService("Players")

local Client = Players.LocalPlayer
local HumanoidDescription = PlayersService:GetHumanoidDescriptionFromUserId(Client.UserId)

Or… even this:

local PlayersService = game:GetService("Players")

local Client = Players.LocalPlayer
local AppearanceInfo = PlayersService:GetCharacterAppearanceInfoAsync(Client.UserId)
1 Like

Do you know anything similar to my script. But instead of local id = number it just takes the id of the player locally.

local id = (id)

local Models = game.Players:GetCharacterAppearanceAsync(id)

Models.Parent = script.Parent

wait()

for i,v in pairs(Models:GetChildren()) do

print(v.Name)

v.Parent = script.Parent

wait()

end

1 Like