How to make a dummy change to player avatar locally

I want to make this present the players character to them when they are in the menu, I have tried replacing the humanoid and also replacing the model entirely, none worked and I’m not sure what to do.
image

local Players = game:GetService("Players")
local dummy = game.Workspace.MainMenu.PlayerChar
local dummyHumanoid = dummy.Humanoid
local id = game:GetService("Players").Player.UserID
local Modle = game.Players:CreateHumanoidModelFromUserId(1537563005)

--1537563005

local Rotation = CFrame.Angles(0, math.rad(140), 0)
local Movement = CFrame.new(-685.991, 13.101, -953.575)

Modle.SetPrimaryPartCFrame(Rotation)
Modle.SetPrimaryPartCFrame(Movement)
wait(1)
dummy:Destroy()

I’m not entirely sure what to do or try next. Any help?

5 Likes

you can spawn a player character, duplicate it, set duplicate parent to another folder, and then remove original.

How would I make it be the player who’s viewing the menu though, and is that not what I have tried to do above?

  1. do it on local script
  2. not, it dont what you tried

If thats client sided, just clone a dummy from a local script and ApplyDescription using the HumanoidDescription of the client

1 Like
local Players = game:GetService("Players")

local dummy = game.Workspace.MainMenu.PlayerChar
local id = Players.Player.UserID
local Description = game.Players:GetHumanoidDescriptionFromUserId(1537563005)

playerDummy = dummy:Clone()
playerDummy.Humanoid:ApplyDescription(Description)
wait(1)
dummy:Destroy()

Like that?

1 Like

player = Players.LocalPlayer

Thats a local script? If you clone the dummy from a server script it wont work.
If thats a local script, whats local id = Players.Player.UserID I think it should be local id = Players.LocalPlayer.UserId

And the dummy doesnt need to be a clone from the original player, just a blank dummy works, the ApplyDescription will do the job to turning it into the player’s appearance

1 Like

Oh another thing. You are cloning the dummy which is at game.Workspace.MAINMENU, thats not needed.

Store a blank dummy in ReplicatedStorage, and clone it whenerver you need it for the menu.

Example. I have a menu that everytime player clicks Menu Button, it shows a clone of their character. Im not using the real player character, Im just cloning a blank dummy from client side, and apply the HumanoidDescription

2 Likes

Ill look into that soon, I was gonna move it all around after it was working as the previous thing I was doing I had to move it in and out of server storage every time I changed it

You need a model/rig cloned from client side, and you wont be able to clone it from client side if its stored in ServerStorage

1 Like
local Players = game:GetService("Players")
local Replicated = game:GetService("ReplicatedStorage")

local dummy = Replicated.PlayerChar
local player = Players.LocalPlayer
local id = player.UserId
local Description = game.Players:GetHumanoidDescriptionFromUserId(1537563005)

playerDummy = dummy:Clone()
playerDummy.Humanoid:ApplyDescription(Description)

So like this?

I need to parent it to the workspace right?

1 Like

Now do it like this

local Description = game.Players:GetHumanoidDescriptionFromUserId(id)
2 Likes

But when I test it, nothing happen. No errors no clone or anything

Only changed line 7 to
local Description = game.Players:GetHumanoidDescriptionFromUserId(id)
and added this
playerDummy.Parent = game.Workspace.MainMenu

1 Like

well, you check game.Workspace.MainMenu, if the dummy is spawned or not

It hasn’t spawned

Only other thing I did was change it from playerDummy = dummy:Clone() to local playerDummy = dummy:Clone()

Works now I just needed to move some stuff thanks!

No problem, it was a pleasure!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.