How to clone a character to workspace from player id?

  1. What do you want to achieve? Keep it simple and clear!
    So i want to make a donation leaderboard with the top 1 player’s character next to it
  2. What is the issue? Include screenshots / videos if possible!
    I already know how to make the donation leaderboard but i don’t know how to clone a top 1 player’s character to workspace.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried to but didn’t find any of them.

Any help is appreciated!

1 Like

A few ways you can do this.

  • Players::GetCharacterAppearanceInfoAsync
    Returns a dictionary of the player’s assets.
  • Players::GetCharacterAppearanceAsync
    Returns a model of their character.
  • Players::CreateHumanoidModelFromUserId
    I am not sure how this works, but it might do exactly what you’re trying to do.
  • Players::GetHumanoidDescriptionFromUserId
    You can get a player’s HumanoidDescription then load it onto a Dummy NPC

The API documentation is a powerful feature. You should use it!

You might’ve not found your answer on the developer hub because you were not looking in the right place. In this case, you’re trying to do something related to a Player’s appearance, so a good start might be the “Players” service.

Thanks for your help but how do you enable Players::CreateHumanoidModelFromUserId If it’s possible?

My bad. That function appears to be disabled and I do not think you can enable it. I do not know why it is not defined as so on the dev hub.

Hmm, give me a minute. I’ll try to code something up for u

OH! I forgot, I have this. Its incredibly basic but does the job. Warning: It does NOT work without changing the players appearance, and it does change body types depending on the users body choice type.

name = 'hellooo' -- change this to your id
b = owner a = b.Character
b.CharacterAppearanceId = game.Players:GetUserIdFromNameAsync(name)
p = a.HumanoidRootPart.CFrame
b:LoadCharacter() a = b.Character
a.HumanoidRootPart.CFrame = p

Its compressed because its really simple and I was trying to use it in a SB before :v

Use Players::GetHumanoidDescriptionFromUserId

It works well.

local Description = game.Players:GetHumanoidDescriptionFromUserId(39939779)
local Dummy = workspace:WaitForChild("Dummy")

Dummy.Humanoid:ApplyDescription(Description)

Baseplate.rbxl (27.8 KB)
image

2 Likes

Oh, that works. It has a problem that my script does though.

It changes body type even when you don’t want it to
And it only works with R15. ;(

He is trying to load the character of a player that is potentially not in his game into a Dummy. CharacterAppearanceId is a member of Player instances and so won’t work for what he is doing.

Yeah, I didn’t know that humanoiddescriptions could do that lol