Morph Not Working

So I’m trying to make a button that when clicked will morph the player. I tested it on a player model and it changes my character but I can’t move. I have a remote event in ReplicatedStorage named ChangeChar and the player model is also in there. The model is from AlreadyPro’s plugin but that shouldn’t be the issue because I tested with another one. Here’s the script for the button:

script.Parent.MouseButton1Click:Connect(function() game.ReplicatedStorage.ChangeChar:FireServer(game.ReplicatedStorage.ROBLOX) end)

And here’s the script in ServerScriptService:

local event = game.ReplicatedStorage.ChangeChar

event.OnServerEvent:Connect(function(player,model)

local Char = model:Clone{}

local Pos = player.Character:GetPrimaryPartCFrame()

player.Character:Destroy{}

player.Character = Char

Char.Parent = workspace

Char:SetPrimaryPartCFrame(Pos)

end)
1 Like

First off why are you using curly braces when cloning?
Secondly I’ve never seen a morphing system like this, Usually people use welds.

local Char = model:Clone{}
player.Character:Destroy{}

change these to this:

local Char = model:Clone()
player.Character:Destroy()
1 Like

I changed the curly braces but it’s still the same. If I use welds would I be able to fix the issue and make morphs that are not character models and if so how would I accomplish this?

You’re probably going to have to set CharacterAutoLoads to false and set the player’s character to that.

I tried adding
CharacterAutoLoads = false at the end of the ServerScriptService Script but it didn’t work. I also tried local CharacterAutoLoads = False and that didn’t work either.

CharacterAutoLoads is a part of the object in explorer, called Players. @mobyboyy is meaning to toggle this off, and not have it inside the script as a variable.

image

Now when I load in my character is not there and my Gui is gone. To clarify i’m not changing the starting character I’m making a Gui for multiple morphs. Some will be character models and others will be objects like chairs and stuff.

I was able to fix the issue myself by searching through each individual part of the player model. For some reason the HumanoidRootPart was anchored but wasn’t showing up in the model tab as anchored. Now I just need to figure out how to make morphs with just parts. Any ideas?

The reason your character doesn’t auto load is because it was disabled. No GUI will load from player until player has spawned.

Player:Loadcharacter() is what youre looking for.