Cloning the Local Player

I’m currently trying to make a dummy clone into the local player. By that, I mean the dummy and the player will have the same appearance. For example, if you join the game the dummy will be your character on your screen and the same dummy will be my character on my screen.

While I am able to successfully clone the local player, I run into another issue. The dummy is being cloned from Replicated Storage into the Workspace. Along the way the animation on the dummy doesn’t work at all after moved into workspace.

I have tried to change scripts from a local script into a normal script using “Player Added”, but that changes the appearance of the dummy for everyone. I have also tried to clone the dummy from Server storage into workspace with no luck.

I will be attaching the script that successfully clones the Local Player into workspace from Replicated Storage. The only issue is the animations won’t work. Which I’m hoping to get some ideas and feedback on what may or may not be the issue.
Thanks, TonyRayFray

Dummy is in Replicated Storage.
Local Script in StarterPlayerScripts:

local dummy = game:GetService("ReplicatedStorage").DummyPlayerMemory2:Clone()
dummy.Parent = workspace
dummy.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(player.UserId))
local set = script.Settings
local sp = set.Speed
local enabled = set.Enabled
local hum = script.Parent:WaitForChild("Humanoid")
if hum then
    print("Success")
else
    print("No Humanoid")
end

I personally haven’t done this, but there’s a few things that you are missing. Specifically, you need to name the dummy to Player.Name. You ALSO MUST set the Player.Character pointer to the new character model, otherwise the game engine won’t find it and other things will break.

local dummy = game:GetService("ReplicatedStorage").DummyPlayerMemory2:Clone()
dummy.Name = player.Name		-- This line
dummy.Parent = workspace	
player.Character = dummy		-- And this line
dummy.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(player.UserId))
local set = script.Settings
local sp = set.Speed
local enabled = set.Enabled
local hum = script.Parent:WaitForChild("Humanoid")
if hum then
	print("Success")
	hum.WalkSpeed = 16	-- Or pull it from wherever
	hum.UseJumpPower = true
	hum.JumpPower = 50	-- Or pull it from wherever
	hum.DisplayName = player.Name
else
	print("No Humanoid")
end

Try that. As I mentioned before, I haven’t personally done this so there may be more that you have to do.

1 Like

Noted, thank you for your feedback.