How to make morph that changes into character that looks like the player's avatar

I am trying to make a morphing system that some morphs need to copy the player avatar and look like them when you morph into them but in r6. I have no clue to code this . will it work if the dummy is in replicated storage and changes to look like the player avatar? I tried looking around but found nothing on this.

I have the morph code if you want to see it I could post it but I doubt it would be that helpful.

1 Like

you don’t actually need a script to turn a player character into r6, what you need to do is publish the game, and then open the game settings, click on the avatar settings and you will find something there that you can toggle if you want r6 or r15

I know, but that’s not what I mean. I have a multiple custom player morphs with abilities. It’s like in the role play games we’re you morph into a character and some times it has special animations that’s what am doing but the character your avatar and there are multiple special morphs with there own animations.and they look like your avatar.

oh, okay. I understand now, maybe this would help R6 to R15 mid game

https://developer.roblox.com/en-us/api-reference/function/Humanoid/ReplaceBodyPartR15

This is the function you’re likely looking for.

No, I don’t mean that, it’s probably R6 that’s confusing you. Here is an example of what I want. In Toytale there is an option to become a smaller child version of your avatar here is an image of it.
role play,
Capture
So I have a dummy that has its own animations and a tool and I want so when you morph into it it’s your avatar another example is Soul Shatters when you morph into a character it can be your avatar and have its own moves and sometimes a tool but it’s a fighting game.
Capture
I have a morph script that works I just need the part where you morph and it grabs your avatar data of items on and transfers it into the character you morph into and I want to keep the character R6 and the same body type so I just want the accessories and shirts and etc not the body type. But am not great at coding and also I don’t want every character to look like your avatar. Hopefully, this isn’t confusing.

oh, i’m sorry i didn’t understand the post right. do you mean you want something that copies the data of the one you’re morphing to? do you mean just the appearance or also the animations and abilities?

I mean just copy the players appearance but not body type.

just the appearance? can i see your current morph script

local changeEvent = game.ReplicatedStorage:WaitForChild("ChangePlayerCharacter")
changeEvent.OnServerEvent:Connect(function(player,chosenCharacter)
	if charsFolder:FindFirstChild(chosenCharacter) then
		local newChar = charsFolder:FindFirstChild(chosenCharacter):Clone()
		local plrChar = player.Character

		if newChar:FindFirstChild("HumanoidRootPart") then
			newChar.PrimaryPart = newChar.HumanoidRootPart
			newChar:SetPrimaryPartCFrame(plrChar.HumanoidRootPart.CFrame)
		elseif newChar:FindFirstChild("Torso") and not newChar:FindFirstChild("HumanoidRootPart") then
			newChar.PrimaryPart = newChar.Torso
			newChar:SetPrimaryPartCFrame(plrChar.Torso.CFrame)
		end


		newChar.Name = player.Name
		player.Character = newChar

		local rootPart = newChar:FindFirstChild("HumanoidRootPart") or newChar:FindFirstChild("Torso")
		local plrRoot = player.Character:FindFirstChild("HumanoidRootPart") or player.Character:FindFirstChild("Torso")

		if rootPart and plrRoot then
			rootPart.CFrame = plrRoot.CFrame
		end

		newChar.Parent = workspace

	end
end)

Just be sure you understand I want it so when you morph into the dummy the dummy turns into your avatar but keeps its body shape.

oh, so what you want to do is just use HumanoidDescription, get the character you want to morph into and then get the description of that character, and befor applying it, save the body parts and then edit the description of the character you want to morph into and edit the body parts with what you’ve saved, apply it into the player and you should get the result you want.

also here’s an example script of what i mean

local function apply_morph(playercharacter)
    local morph = yourMorph
    local morphhumanoid = morph:FindFirstChildOfClass("Humanoid")
    local playerhumanoid = playercharacter:FindFirstChildOfClass("Humanoid")
    
    local default_description = playerhumanoid:GetAppliedDescription()
    local head = default_description.Head
    local torso = default_description.Torso
    local l_arm = default_description.LeftArm
    local r_arm = default_description.RightArm
    local l_leg = default_description.LeftLeg
    local r_arm = default_description.RightArm

    local morphdescription = morphhumanoid:GetAppliedDescription()
    morphdescription.Head = head
	morphdescription.LeftArm = l_arm
	morphdescription.RightArm = r_arm
	morphdescription.LeftLeg = l_leg
	morphdescription.RightLeg = r_leg
	morphdescription.Torso = torso

	playerhumanoid:ApplyDescription(morphdescription)
end

I don’t know how to explain it that well it seems. The morph is done for example I made a morph with a knife and some animations and when the player morphs into it there avatar data aka their clothes and accessories are sent to the dummy so the dummy looks like the player here another example.
robloxapp-20211113-0943415.wmv (1.7 MB)
In the video, the character you choose aka the morph turns into your avatar and you get different animations and a tool and you turn into a certain body type. That is what I want I just need the part where the morph turns into your avatar and maybe is holding a knife.

wait i might being smart so where do i plug that script in to test?

on wherever you are morphin the player

Do you mean but it into this script?

local changeEvent = game.ReplicatedStorage:WaitForChild("ChangePlayerCharacter")

local characterValue = script.Parent:WaitForChild("CharacterName")

local isCool = false
local coolTime = 1

script.Parent.MouseButton1Click:Connect(function(player)
	if isCool == false then
		isCool = true
		local charactername = characterValue.Value
		changeEvent:FireServer(charactername)
	
	

	end
end)

changeEvent.OnClientEvent:Connect(function()
	wait(coolTime)
	isCool = false
end)

am new so I don’t understand much.

is that a local script? you should put it in a server script

yes and the other is a server script

put it in a server script where your current morph script is located

it isn’t working I don’t know if its on the right spot on the script. Should i replace something in the script?

it won’t work since you are not running the function yet, run it with

apply_morph( put your character here ) -- put the character you want to morph inside

under the function