Help making custom character morphs

I’ve been trying to make a morph GUI recently, and It’s practically finished, I’m just stuck on the morphing script itself. I’ve been using the script below to change the character model, but when I do the camera stays in place instead of moving with the character. Any suggestions on how to get around this?

local Model = game.Workspace.MorphSaves.MorphNameHere
local Morph = Model:Clone()
		Morph.Parent = workspace
		Morph:MoveTo(player.Character.Torso.Position)
		Morph.Name = player.Name
		player.Character = Morph
7 Likes

Have you tried setting the CameraSubject to the Morph object instance?

1 Like

Could you give me an example? I’m not sure if I understand what you mean.

1 Like
local human = Morph:FindFirstChildOfClass("Humanoid")

if human then

  workspace.CurrentCamera.CameraSubject = human

end

2 Likes

Tried it and it didn’t work. Didn’t print any errors in the output either :thinking:

1 Like

Could you show a video example of what is happening to the camera?

1 Like

https://gyazo.com/46b0e602d775a42e2275e0a91f9203e7

2 Likes

Hm… that’s weird. Do you manipulate your camera in any way? Or do you have any suspicions on what may be causing this?

1 Like

No clue. And I just typed this up on a new baseplate for testing so this is the only script in the game

1 Like

I am doing this inside a remote event being called by the gui if that helps at all

1 Like

Have you tried to change the Camera Type?

1 Like

Just wondering, does the Morph have a humanoid?

Tried changing it to what?

1 Like

yes

1 Like

Add a RemoteEvent in ReplicatedStorage, and try implementing the code above in the client, if you are using the server. The camera cannot be manipulated in the server.

1 Like

workspace.CurentCamera.CameraSubject = Morph:WaitForChild(“Humanoid”)

The above code MUST BE IN A LOCAL SCRIPT.

Believe your camera type should be on Follow

Custom will work too. They have not set the subject, however.

Yeah either way

I tried both Custom and Follow