Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Custom character with user apperance?

Asked by 4 years ago
Edited 4 years ago

I have a custom character that is basically starter but with couple extra parts. Do I have to write a custom function that gets all player accessories and puts it on the character when it loads or does Roblox already handle this with some specific function?

1 answer

Log in to vote
1
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

You could use GetCharacterAppearanceAsync to get a variable containg the players model, loop through the accessories and attatchements and put them on the custom character.

Remember after you get the model you need to parent it somewhere such as the workspace.

local players = game:GetService("Players")
local success, character = pcall(function()   
return players:GetCharacterAppearanceAsync(player.UserId)
end)

if(success)then
        print("got player's character")
        print(character)
else
       print("could not get players character")
end

Aside from that, there is not a built in Roblox function to transfer the characters appearance directly onto the custom character.

0
pls make players variable local programmerHere 371 — 4y
0
my bad my bad I was typing on mobile and didnt notice royaltoe 5144 — 4y
0
Cloning new parts and scripts into a base character sounds like an easier option. (Whil probably a very hacky and unprofessional). Thanks for the info tho! ItsNimbusCloud 66 — 4y
Ad

Answer this question