Copy Player Avatar Into Game

Thank you for taking the time to read this.

I have seen in several popular games that the developer has copied a player avatar into the game, animating it with a wave or something, when that player is at the Top of their leaderboard for a specific category.

I would like to replicate this functionality into my game but I have no idea where to start. I see that there are many plugins that copy a player avatar into the game, but I have no idea how to read plugins to see the code.

Can anyone please give me a quick rundown, or a quick sample, of how to copy the player avatar into the game using either the player.Name or player.UserId so that I could have this type of system? I think it is a really cool feature and would like to use it.

Regards,

TweetClean

1 Like

Typically, plugins’ code is stored in:
%localappdata%/Roblox/InstalledPlugins/<PluginID>

However, I’ve also had code stored in other places within the Roblox folder, though you should be able to find the folder with the code if you just search the plugin’s ID once you’re in
%localappdata%/Roblox/

The plugin I use to import characters into games can be found here and was actually found in one of these weird folders.

Hope this helps!

1 Like

If you want a player’s character to be added you can do either two things:

One (Recommended for big games)

Use a PlayerAdded script to duplicate their avatar into ServerStorage which then moves it so it’s parent is the podium; first, second or third

Two (Not recommended for big games)

Go into studio and copy it using a plugin called Load Character to copy the player into the top 3 podium.

3 Likes

Thanks. I cannot open .rbxm files in studio, even when I specifically assign the .rbxm extension to studio. I am not sure what I am doing wrong. When I click on the plugin.rbxm file after associating the extension, the Roblox Studio does come up but it doesn’t load the file.

Thanks for taking the time to reply.

You don’t need to open .rbxm files unless you made a load character script yourself.
A .rbxm file is a roblox model file. The avatar is on clientsided roblox so it will NEVER start on the server. You are moving the top 3 into the server when they become top 3 (unless you use step 2)

1 Like

You can use Players:GetCharacterAppearanceAsync. It will return a model of the player’s avatar. Look it up on the API for more info.

Note that you will need to parent it to game.Workspace first.

5 Likes

Thank you so much. This is exactly what I was looking for.

You can also use:
Humanoid:LoadDescription(game.Players:GetHumanoidDescriptionFromUserId(UserID))
*from the server only

3 Likes

Thank you. As soon as the developer API comes back online for me, I will look up both of these solutions. Given my architecture, I think the solution from the server would work best since I run my leaderboard routines from the server and push to the clients.

Roblox decently recently made a HumanoidDescription API that makes this very simple.

You can check out the DevHub info on it here (though the DevHub might still be under maintence): HumanoidDescription | Documentation - Roblox Creator Hub

If the DevHub is under maintenance you can get a more general idea of the API here: New API For Equipping Assets on Humanoid Player Avatars

The basic idea is that you can use Players:GetHumanoidDescriptionFromUserId(userId) to get a description of the assets a “Top Player” is wearing, and then Humanoid:ApplyDescription(humanoidDescription) to apply it.

EDIT: Dang somone else beat me to it, haha. I was in here when you first posted but work got busy. Don’t be afraid to ‘@’ me if you have questions on using it, I may not have all the answers but I was really hype when this API came out and familiarized myself with it.

4 Likes

Thank you very much for taking the time to answer. I sincerely appreciate all of the feedback.

1 Like

I had the same problem in my game because me and the game’s builder opened a submissions for your character to be featured in game as train passenger in the train map. I imported default dummy characters as the train passengers and named every dummy after the userid of the player who should appear in game in place of the dummy. Then I made a script that will loop through every single dummy and apply HumanoidDescription that was retrieved from the dummy’s name (UserID) using GetHumanoidDescriptionFromUserID(dummy.Name). And of course apply it.

I wanted to thank everyone who replied. I was really intimidated by this, but the HumanoidDescription API actually made this whole exercise a snap.

I don’t suppose anyone knows how to prevent some Humanoids, I think they are the Rthro but I am not sure, from sinking halfway into the floor? I think it has something to do with the Hip Height Placement but for R15 it is always been set to 1.35 in the past.

You can disable AutomaticScalingEnabled to false and edit it yourself.
You can edit the HipHeight using calculations with the leg size.

Thank you, I will give that a whirl.