i want to get the players model for a start screen
I tried using game.Players:GetCharacterAppearanceAsync() but that only returns their assets. I want the character’s entire model, and i have no clue how to do it
Is there a function for this that i dont know about, or is there some method of building a custom rig and then adhering the player’s assets to it?
You can’t get a player’s entire model because that’s not how appearance loading works. A character’s appearance is applied against a default template rig construct. You are able to obtain this construct through the animation editor and it’s rig creator. From there, it’s about applying the character’s appearance to said rig to make it appear like the player.
Provided HumanoidDescriptions have been updated to work on NPCs, the easiest way to go about loading an avatar onto a blank construct is to apply what gets returned from GetHumanoidDescriptionFromUserId.
Thanks guys. one last thing tho, i’ve been trying to loop through the getinfoasync and apply it to the humanoid description, but i dont quite know how. Is there a way to iterate through a humanoidDescription’s properties, or do i have to set them manually?
local charModel = game.Players:GetCharacterAppearanceInfoAsync(Player.UserId)
local loadModel = spawnModel.Dummy
wait()
spawnModel.Parent = game.Workspace
for _, i in pairs(charModel) do
if i then
if typeof(i) == "table" then
for _, k in pairs(i) do
loadModel.Humanoid.HumanoidDescription[k] = k
end
else
loadModel.Humanoid.HumanoidDescription[i] = i
end
end
end
Took this directly from the posts I linked with minor modifications
local Players = game:GetService("Players")
local Dum = workspace.Dummy
local ID = Players:GetUserIdFromNameAsync("wevetments") --or remove this and put user id
local function CreateOfflineCharacter(UserID, Dummy)
local Appearance = Players:GetHumanoidDescriptionFromUserId(UserID)
Dummy.Humanoid:ApplyDescription(Appearance)
end
CreateOfflineCharacter(ID, Dum)