Tutorial · Gameplay

How to make a morph in Roblox Studio

A morph turns a player into a different character: a zombie in an infection game, a monster in a horror game, a team uniform in a roleplay game. The player's character is just a Model with a Humanoid, so a morph swaps that Model for a copy of yours. This guide builds one server Script that morphs players when they step on a pad or click a button, keeps walking, jumping and animations working, and lets players change back.

Updated 14 November 20269 min readIntermediateLuauWritten by

In short

Put your morph Models in a Folder called Morphs in ServerStorage. Each needs a Humanoid and an unanchored HumanoidRootPart set as its PrimaryPart. In a Script in ServerScriptService, clone the morph, move it to the old character with morph:PivotTo(old:GetPivot()), copy the old character's Animate script into it, then set player.Character = morph and parent it to the Workspace.

  • Do it on the server. A morph made by a LocalScript only shows on one screen, and the server would still think the player is their old character.
  • Every part of the morph must be unanchored and joined to the HumanoidRootPart, with Motor6D joints or WeldConstraints, or the body falls apart or cannot move.
  • A morph with no joint named Neck dies at once unless you set Humanoid.RequiresNeck to false. The script does that for you.

Get the script

Morph script with pads and buttons

One Script in ServerScriptService: touch a MorphPad or click a button to become a model from ServerStorage, with animations and a reset.

Script in ServerScriptService named Morphs
-- Script in ServerScriptService named Morphs.
-- Turns players into models from ServerStorage.Morphs, from MorphPad parts or a GUI button.
local CollectionService = game:GetService("CollectionService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local MORPH_COOLDOWN = 2 -- seconds between morphs for one player
local KEEP_AFTER_DEATH = false -- respawn as the last morph instead of the player's avatar

local morphFolder = ServerStorage:WaitForChild("Morphs")

local requestMorph = Instance.new("RemoteEvent")
requestMorph.Name = "RequestMorph"
requestMorph.Parent = ReplicatedStorage

local lastMorph: { [Player]: number } = {}
local morphing: { [Player]: boolean } = {}
local madeMorph: { [Player]: Model } = {} -- the last morph model this script gave each player

local function getMorphModel(name: string): Model?
	local model = morphFolder:FindFirstChild(name)
	if model and model:IsA("Model") and model:FindFirstChildOfClass("Humanoid") and model:FindFirstChild("HumanoidRootPart") then
		return model
	end
	return nil
end

local function morph(player: Player, name: string)
	local now = os.clock()
	if morphing[player] or now - (lastMorph[player] or -math.huge) < MORPH_COOLDOWN then
		return
	end
	local old = player.Character
	local oldHumanoid = old and old:FindFirstChildOfClass("Humanoid")
	if not (old and oldHumanoid) or oldHumanoid.Health <= 0 then
		return
	end
	lastMorph[player] = now

	if name == "" then
		-- An empty name changes the player back to their own avatar
		player:SetAttribute("Morph", nil)
		morphing[player] = true
		local pivot = old:GetPivot()
		player:LoadCharacterAsync()
		local character = player.Character
		if character then
			character:PivotTo(pivot) -- stay where you were instead of going to spawn
		end
		morphing[player] = nil
		return
	end

	local template = getMorphModel(name)
	if not template then
		return -- not a morph we offer
	end
	local new = template:Clone()
	new.Name = player.Name
	local humanoid = new:FindFirstChildOfClass("Humanoid") :: Humanoid
	local root = new:FindFirstChild("HumanoidRootPart") :: BasePart
	new.PrimaryPart = root

	-- A model with no Neck joint would die at once, because RequiresNeck is on by default
	local neck = new:FindFirstChild("Neck", true)
	if not (neck and neck:IsA("Motor6D")) then
		humanoid.RequiresNeck = false
	end

	-- Bring the old character's animation script if the morph has none and uses the same rig
	local animate = old:FindFirstChild("Animate")
	if animate and not new:FindFirstChild("Animate") and humanoid.RigType == oldHumanoid.RigType then
		animate:Clone().Parent = new
	end

	-- Same place and facing as the old character, lifted a little so it does not spawn in the floor
	new:PivotTo(old:GetPivot() + Vector3.new(0, 1, 0))
	player:SetAttribute("Morph", name)
	madeMorph[player] = new
	player.Character = new
	new.Parent = workspace
	old:Destroy()
end

-- Pads: any part tagged MorphPad, with a Morph attribute naming the model
local function setUpPad(pad: Instance)
	if not pad:IsA("BasePart") then
		return
	end
	pad.Touched:Connect(function(hit: BasePart)
		local character = hit.Parent
		local player = if character and character:IsA("Model") then Players:GetPlayerFromCharacter(character) else nil
		if not player then
			return
		end
		local name = pad:GetAttribute("Morph")
		local wanted = if typeof(name) == "string" then name else ""
		if player:GetAttribute("Morph") == wanted or (wanted == "" and player:GetAttribute("Morph") == nil) then
			return -- already this morph
		end
		morph(player, wanted)
	end)
end

for _, pad in CollectionService:GetTagged("MorphPad") do
	setUpPad(pad)
end
CollectionService:GetInstanceAddedSignal("MorphPad"):Connect(setUpPad)

-- Buttons: the client sends only a name, checked here against the Morphs folder
requestMorph.OnServerEvent:Connect(function(player: Player, name: unknown)
	if typeof(name) ~= "string" or #name > 50 then
		return
	end
	if name ~= "" and not getMorphModel(name) then
		return
	end
	morph(player, name)
end)

-- A real respawn: come back as the same morph (optional), or clear the saved morph
local function onPlayerAdded(player: Player)
	player.CharacterAdded:Connect(function(character: Model)
		if character == madeMorph[player] then
			return -- this is the morph we just made, not a respawn
		end
		local name = player:GetAttribute("Morph")
		if KEEP_AFTER_DEATH and typeof(name) == "string" then
			task.defer(function()
				lastMorph[player] = nil -- no cooldown for this one
				morph(player, name)
			end)
		else
			player:SetAttribute("Morph", nil)
		end
	end)
end

Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
	onPlayerAdded(player)
end

Players.PlayerRemoving:Connect(function(player: Player)
	lastMorph[player] = nil
	morphing[player] = nil
	madeMorph[player] = nil
end)

RoCode builds it in the place you have open in Roblox Studio, on Windows or macOS with a desktop browser; on a phone the button sends the prompt and the link to your computer. Free to start, with free credits every day. More Roblox Studio scripts

Where to put it

Explorer: the morph models, one Script, and pads
ServerStorage
  Morphs Folder new
    Zombie Model (your morph)
ServerScriptService
  Morphs Script new
Workspace
  ZombiePad Part (tag: MorphPad, Morph = "Zombie")

Settings you can change

MORPH_COOLDOWNIn the script
Seconds a player must wait between morphs, from a pad or a button. Default: 2.
KEEP_AFTER_DEATHIn the script
When true, a player who dies respawns as their last morph instead of their own avatar. Default: false.
MorphAttribute
On a MorphPad: the name of the model in ServerStorage.Morphs to turn into. Leave it empty for a pad that changes players back. Default: none.

The name of each Model in ServerStorage.Morphs is what the pads and buttons ask for, so keep it simple, such as Zombie, with no spaces.

What a cheater can and cannot doThe button sends only a name. The server checks that it is a string, that a model with that name exists in its own Morphs folder, and that the player's cooldown has passed, so a cheater can only pick morphs you already offer. To sell a morph, check ownership on the server too: Step 5.

Type-checked with luau-lsp strict against Roblox's API definitions on 14 November 2026. Not playtested in Studio yet: press Play and watch the Output window before you publish.

Prompt for RoCode

Add morphs to my game: a Folder ServerStorage.Morphs with my morph models, and one Script in ServerScriptService that morphs a player on the server when they touch a part tagged MorphPad (its Morph attribute is the model name) or when a GUI button fires a RemoteEvent with the name. Check the name against the folder and add a 2 second cooldown, place the morph with PivotTo, copy the Animate script, turn off RequiresNeck if there is no Neck joint, and let an empty name change the player back.

On this page
  1. Get the script
  2. How it works
  3. 1. The model
  4. 2. Script
  5. 3. Explained
  6. 4. Pads and buttons
  7. 5. Locked morphs
  8. 6. Test
  9. Common errors
  10. With RoCode
  11. Questions
  12. Sources

How a morph works

A player's character is the Model stored in player.Character. Roblox makes it when the player spawns, and the movement and camera scripts on the player's device drive whatever Model that property points to. A morph sets the property to a different Model.

Two kinds of morph
KindHowGood for
Model morph (this guide)Replace the whole character with a copy of a Model you built.Monsters, animals, robots, anything that does not look like a Roblox avatar.
Avatar morphKeep the character and change its look with Humanoid:ApplyDescriptionAsync.Outfits, skin colours and team uniforms on a normal avatar.

If your morph is really an outfit on a normal avatar, the avatar morph is simpler and keeps everything about the character. The character customization guide builds that. For anything else, read on.

Step 1: Prepare a morph model

Most morph problems come from the model, not the script. The easiest start is a rig Roblox already built correctly.

  1. On the Avatar tab, use the Rig Builder to insert an R15 rig. It already has a Humanoid, a HumanoidRootPart and all its joints.
  2. Change its look: recolour parts, add accessories, or put your own meshes on it. Keep the part names and the joints.
  3. Select every part in the model and untick Anchored.
  4. Select the model and set its PrimaryPart to HumanoidRootPart.
  5. Rename the model, for example Zombie. In ServerStorage, insert a Folder named Morphs and move the model into it.
What a morph model needs
NeedsWhy
A Humanoid named HumanoidWalking, jumping and health all live in it.
A HumanoidRootPart, unanchored, as PrimaryPartThe Humanoid moves the character by this part.
Every part joined to the root partMotor6D joints for animated limbs, WeldConstraints for decorations. Loose parts fall off.
No anchored partsOne anchored part holds the whole character in place.
A Head part (recommended)Roblox shows the name and health above it.

Step 2: The morph Script

  1. Hover over ServerScriptService, click + and insert a Script. Name it Morphs.
  2. Paste the code below. It creates the RemoteEvent for the buttons itself.
Script in ServerScriptService named Morphs
-- Script in ServerScriptService named Morphs.
-- Turns players into models from ServerStorage.Morphs, from MorphPad parts or a GUI button.
local CollectionService = game:GetService("CollectionService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local MORPH_COOLDOWN = 2 -- seconds between morphs for one player
local KEEP_AFTER_DEATH = false -- respawn as the last morph instead of the player's avatar

local morphFolder = ServerStorage:WaitForChild("Morphs")

local requestMorph = Instance.new("RemoteEvent")
requestMorph.Name = "RequestMorph"
requestMorph.Parent = ReplicatedStorage

local lastMorph: { [Player]: number } = {}
local morphing: { [Player]: boolean } = {}
local madeMorph: { [Player]: Model } = {} -- the last morph model this script gave each player

local function getMorphModel(name: string): Model?
	local model = morphFolder:FindFirstChild(name)
	if model and model:IsA("Model") and model:FindFirstChildOfClass("Humanoid") and model:FindFirstChild("HumanoidRootPart") then
		return model
	end
	return nil
end

local function morph(player: Player, name: string)
	local now = os.clock()
	if morphing[player] or now - (lastMorph[player] or -math.huge) < MORPH_COOLDOWN then
		return
	end
	local old = player.Character
	local oldHumanoid = old and old:FindFirstChildOfClass("Humanoid")
	if not (old and oldHumanoid) or oldHumanoid.Health <= 0 then
		return
	end
	lastMorph[player] = now

	if name == "" then
		-- An empty name changes the player back to their own avatar
		player:SetAttribute("Morph", nil)
		morphing[player] = true
		local pivot = old:GetPivot()
		player:LoadCharacterAsync()
		local character = player.Character
		if character then
			character:PivotTo(pivot) -- stay where you were instead of going to spawn
		end
		morphing[player] = nil
		return
	end

	local template = getMorphModel(name)
	if not template then
		return -- not a morph we offer
	end
	local new = template:Clone()
	new.Name = player.Name
	local humanoid = new:FindFirstChildOfClass("Humanoid") :: Humanoid
	local root = new:FindFirstChild("HumanoidRootPart") :: BasePart
	new.PrimaryPart = root

	-- A model with no Neck joint would die at once, because RequiresNeck is on by default
	local neck = new:FindFirstChild("Neck", true)
	if not (neck and neck:IsA("Motor6D")) then
		humanoid.RequiresNeck = false
	end

	-- Bring the old character's animation script if the morph has none and uses the same rig
	local animate = old:FindFirstChild("Animate")
	if animate and not new:FindFirstChild("Animate") and humanoid.RigType == oldHumanoid.RigType then
		animate:Clone().Parent = new
	end

	-- Same place and facing as the old character, lifted a little so it does not spawn in the floor
	new:PivotTo(old:GetPivot() + Vector3.new(0, 1, 0))
	player:SetAttribute("Morph", name)
	madeMorph[player] = new
	player.Character = new
	new.Parent = workspace
	old:Destroy()
end

-- Pads: any part tagged MorphPad, with a Morph attribute naming the model
local function setUpPad(pad: Instance)
	if not pad:IsA("BasePart") then
		return
	end
	pad.Touched:Connect(function(hit: BasePart)
		local character = hit.Parent
		local player = if character and character:IsA("Model") then Players:GetPlayerFromCharacter(character) else nil
		if not player then
			return
		end
		local name = pad:GetAttribute("Morph")
		local wanted = if typeof(name) == "string" then name else ""
		if player:GetAttribute("Morph") == wanted or (wanted == "" and player:GetAttribute("Morph") == nil) then
			return -- already this morph
		end
		morph(player, wanted)
	end)
end

for _, pad in CollectionService:GetTagged("MorphPad") do
	setUpPad(pad)
end
CollectionService:GetInstanceAddedSignal("MorphPad"):Connect(setUpPad)

-- Buttons: the client sends only a name, checked here against the Morphs folder
requestMorph.OnServerEvent:Connect(function(player: Player, name: unknown)
	if typeof(name) ~= "string" or #name > 50 then
		return
	end
	if name ~= "" and not getMorphModel(name) then
		return
	end
	morph(player, name)
end)

-- A real respawn: come back as the same morph (optional), or clear the saved morph
local function onPlayerAdded(player: Player)
	player.CharacterAdded:Connect(function(character: Model)
		if character == madeMorph[player] then
			return -- this is the morph we just made, not a respawn
		end
		local name = player:GetAttribute("Morph")
		if KEEP_AFTER_DEATH and typeof(name) == "string" then
			task.defer(function()
				lastMorph[player] = nil -- no cooldown for this one
				morph(player, name)
			end)
		else
			player:SetAttribute("Morph", nil)
		end
	end)
end

Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in Players:GetPlayers() do
	onPlayerAdded(player)
end

Players.PlayerRemoving:Connect(function(player: Player)
	lastMorph[player] = nil
	morphing[player] = nil
	madeMorph[player] = nil
end)

Step 3: Why each step is there

The order of the swap

The script clones the morph, fixes it up while it is still outside the Workspace, moves it to the old character with PivotTo, sets player.Character, parents it to the Workspace, and only then destroys the old character. Doing it in that order means the player is never without a character, so nothing on their device loses track of them. The new model is named after the player, the same as a normal character.

Animations

Roblox's walk, jump and idle animations come from a LocalScript named Animate inside every spawned character. A Model from ServerStorage has none, so it would slide around in a T-pose. The script copies the old character's Animate into the morph when both use the same RigType. An R6 morph needs R6 animations, so give such a model its own Animate script and the script leaves it alone.

Changing back

An empty name calls player:LoadCharacterAsync(), which gives the player a fresh character with their own avatar, then moves it back to where they stood. Roblox lists LoadCharacter as deprecated in favour of LoadCharacterAsync, so use the new name. LoadCharacterAsync also clears the player's Backpack and PlayerGui, so tools and screens reset as if they had respawned.

After dying

When a morphed player dies, Roblox respawns them with their own avatar. With KEEP_AFTER_DEATH set to true, the script morphs them again right after they spawn, using the name saved in the player's Morph attribute. That attribute is also useful elsewhere: a team script can read it to know who is a zombie.

Step 4: Add pads and buttons

A morph pad

  1. Insert a Part where players should step to morph. Anchor it.
  2. In the Properties window, under Tags, click + and type MorphPad.
  3. Under Attributes, click +, add a string attribute named Morph and type the model's name, such as Zombie.
  4. For a pad that changes players back, add the same attribute and leave it empty.

A morph button

A button in a menu sends the morph's name to the server. Put this LocalScript inside a ScreenGui in StarterGui; it makes one button for each name in its list and a "Me" button that changes back.

LocalScript in a ScreenGui in StarterGui named MorphButtons
-- LocalScript inside a ScreenGui in StarterGui, named MorphButtons.
-- One button per morph name; the server checks every name it receives.
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local MORPH_NAMES = { "Zombie", "Robot" } -- the names of your models in ServerStorage.Morphs

local requestMorph = ReplicatedStorage:WaitForChild("RequestMorph") :: RemoteEvent
local gui = script.Parent :: ScreenGui

local list = Instance.new("Frame")
list.AnchorPoint = Vector2.new(0, 0.5)
list.Position = UDim2.new(0, 16, 0.5, 0)
list.Size = UDim2.fromOffset(140, 0)
list.AutomaticSize = Enum.AutomaticSize.Y
list.BackgroundTransparency = 1
list.Parent = gui
local layout = Instance.new("UIListLayout")
layout.Padding = UDim.new(0, 8)
layout.SortOrder = Enum.SortOrder.LayoutOrder
layout.Parent = list

local function addButton(text: string, morphName: string, order: number)
	local button = Instance.new("TextButton")
	button.Size = UDim2.fromOffset(140, 40)
	button.LayoutOrder = order
	button.Text = text
	button.Font = Enum.Font.GothamBold
	button.TextSize = 16
	button.TextColor3 = Color3.fromRGB(255, 255, 255)
	button.BackgroundColor3 = Color3.fromRGB(45, 40, 60)
	local corner = Instance.new("UICorner")
	corner.CornerRadius = UDim.new(0, 8)
	corner.Parent = button
	button.Parent = list
	button.Activated:Connect(function()
		requestMorph:FireServer(morphName)
	end)
end

for index, name in MORPH_NAMES do
	addButton(name, name, index)
end
addButton("Me", "", #MORPH_NAMES + 1)

Untick ResetOnSpawn on the ScreenGui if the buttons should not flicker when a morph or reset happens. The GUI button guide covers styling and placing buttons.

Step 5: Morphs for game pass owners or teams

The button only sends a name, so a cheater can ask for any morph in the folder. If a morph should be for game pass owners or one team, check that on the server in the OnServerEvent handler before calling morph. For a team, compare player.Team with the team the morph belongs to. For a game pass, use the owner check from the game pass guide, which remembers UserOwnsGamePassAsync for each player.

Never hide the button on the client and call that the lock. Hiding the button is only for looks; the server check is the lock.

Step 6: Test it

  1. Open the Output window (Window menu, then Output) and press Play.
  2. Step on the Zombie pad: you turn into the model where you stood, and you can walk, jump and see the walk animation.
  3. Step on the reset pad or click Me: you are your own avatar again, in the same spot.
  4. Click a morph button twice quickly: the second click does nothing until the 2 second cooldown passes.
  5. Reset your character while morphed: you come back as your avatar, or as the morph if KEEP_AFTER_DEATH is true.
  6. Start a local server with 2 players from the Test tab: the other player should see your morph.

Common errors and fixes

Most morph problems are in the model. Check the Output window, then the model against the table in Step 1.

The player dies as soon as they morph

The model has no Motor6D named Neck and RequiresNeck was on, or the Head is not joined to the body. The script turns RequiresNeck off when there is no Neck; check the head is joined too.

The morph cannot move

A part in the model is anchored. Select all its parts and untick Anchored. Also check the HumanoidRootPart is the PrimaryPart.

The morph falls apart

Some parts are not joined to the root part. Add WeldConstraints from each loose part to a body part.

The morph slides in a T-pose

It has no Animate script, or a different RigType from the player's avatar so the script did not copy one. Add an Animate script that matches the morph's rig.

Nothing happens on the pad

Check the tag is exactly MorphPad, the attribute is a string named Morph, and the name matches a Model in ServerStorage.Morphs.

Build it with RoCode

If you would rather not set this up by hand, RoCode can build it in the place you have open. RoCode is an independent AI agent for Roblox Studio, not made by Roblox: you describe the change in a web chat, and its Studio plugin creates the parts and scripts in your Explorer, so there is no code to paste.

You type

Add a morph room to my roleplay game: three pads that turn players into my Police, Doctor and Chef models in ServerStorage, and a pad that changes them back.

RoCode does
  • Can read your place first to find your models, then checks they have a Humanoid and unanchored parts before wiring them up
  • Writes the scripts with Create Script and is told to compile-check each one with Check Script
  • Sets an undo point before and after each batch of changes, so Ctrl+Z steps back one batch at a time

After a build, RoCode can run its test robot: it plays your game in Studio and reports PASS or FAIL. It checks only what it chose to test, so try each morph yourself too. How RoCode connects to Studio.

Questions

How do you make a morph in Roblox Studio?

Put a Model with a Humanoid and an unanchored HumanoidRootPart in ServerStorage. In a server Script, clone it, move it to the player with PivotTo, copy the Animate script, and set player.Character to it. Step 2 has the full script.

How do I make a morph pad?

Tag a part MorphPad and give it a string attribute Morph with the model's name. The script in Step 2 morphs anyone who touches it.

Why does my morph not have animations?

Animations come from the Animate script in the character. Copy it from the old character, or add one that matches the morph's rig type.

Should a morph script be a LocalScript?

No. A morph made on the client only shows on one screen. Use a Script on the server, and let buttons send a RemoteEvent with the name.

How do I change back from a morph?

Call player:LoadCharacterAsync() on the server. The script does this when it gets an empty name.

Sources and further reading

How the code was checked: every script on this page passes Luau's strict type checker against Roblox's API definitions (luau-lsp, 14 November 2026). A type check catches misspelt APIs and wrong types, not game logic, so playtest in Studio before you publish.

Try RoCode on your own place.

Free every day, no card required. Install the plugin, describe the feature, and review what lands in Studio.