How do i put the localplayers avatar on a dummy? (LOCALLY)

I am trying to make a startscreen with the player’s avatar on it, example:

You may look at this image and think that i have already achieved it, but no.
I achieved this using Humanoid:ApplyDescription(), which makes the hats look buggy and also, once a new player joins, their avatar is shown and everyone thats in the begin screen sees that avatar.

What i am trying to achieve now is clone the localplayer’s character, and put it where the dummy would be and then delete the dummy. I have already tried and failing with this code:

game.Players.PlayerAdded:Connect(function(plr)
	if plr.Name == game.Players.LocalPlayer.Name then
		local char = game.Players.LocalPlayer.Character:Clone()
		char.Parent = workspace.StarterCharModel
		char:SetPrimaryPartCFrame(workspace.StarterDummy.PrimaryPart.CFrame)
		workspace.StarterDummy:Destroy()
	end
end)

If anyone could help me with this problem it would be greatly appreciated. Thanks!

1 Like

You could either have players spawn apart from each other and move the workspace.CurrentCamera.CFrame to where you want to camera to be.

Or you could use a ViewportFrame to render the player’s character in there and have it all be in GUI.

Check this one :slight_smile:

Also, use a viewport frame to let player see himself on his gui

You can also do it just using GUI

local players = game:GetService("Players")
local player = players.LocalPlayer

local imageLabel = script.Parent

local success, result = pcall(function()
	return players:GetUserThumbnailAsync(player.UserId, Enum.ThumbnailType.AvatarThumbnail, Enum.ThumbnailSize.Size420x420)
end)

if success then
	if result then
		imageLabel.Image = result
	end
else
	warn(result)
end

You just set player avatar to imagelabel.image

Remove the game.Players.PlayerAdded thing. It seems that you are already using a local script, so it is unneeded and is what is causing other player’s avatars to show

CreateHumanoidModelFromUserId works but the RigType is determined by the Player’s choice, if you MUST use a specific RigType like R6 or R15, then use GetCharacterAppearanceInfoAsync

It returns a table of assets which you can loop over and parent them respectively to the Dummy character.

For the ViewPortFrame part, it isn’t really necessary, it could save you performance but some find the white outline a bit annoying to look at.

I would also suggest having an idle animation on the Dummy character too

You can create a model named StarterCharModel and put in it a character model with the same name of the player.
Each time a player joins the game, you can do:
game.Players.PlayerAdded:Connect(function(plr)
if plr.Name == game.Players.LocalPlayer.Name then
local char = game.Players.LocalPlayer.Character:Clone()
char.Parent = workspace.StarterCharModel
char:SetPrimaryPartCFrame(workspace.StarterDummy.PrimaryPart.CFrame)
workspace.StarterDummy:Destroy()
end
end)