Having problems changing character using player.Character

I want to change a player’s character to another using player.Character. However, I’m experiencing many issues such as:

  1. The camera not being centred on the new character
  2. The new character is not playing any animations
  3. The new character is not auto-rotating when I’m in the first-person view or when I’m shift-locking

Here’s my script:

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(plr)
	wait(5)
	plr.Character = workspace.Dummy
	for _, inst in ipairs(workspace.Dummy:GetDescendants()) do
		if inst:IsA("BasePart") then
			inst:SetNetworkOwner(plr)
		end
	end
end)

I tested setting the new character as a StarterCharacter and that works like intended. Any ideas to fix these issues?

2 Likes

You need an animation script in the dummy and you need to change the camerasubject = to the dummy’s humanoidrootpart.

The camera subject is set to the Humanoid.

Make sure all the dummy objects are not anchored.

That fixes my first and third problem. But I’m still having problems with the second. It already has a Animate local script in it yet it isn’t playing any animations?

You said it’s a dummy correct? You need a local script for player characters, you can clone the Animate LS and parent it to the new character.

Please provide pictures so I can see the situation.

1 Like

dummy
This is what my Dummy looks like. It’s basically the default R6 dummy but it has the Animate script because I ran it as a StarterCharacter and copied that model.

Oh now that makes sense, if you are using the r15 animate script then it won’t work.

You need to get the R6 animate script.

Use R15 or use the R6 animate script.

It is the R6 animate script though. However, I fixed it myself after by placing the animate script only when the character changes and not when the game runs.

So that solves my second issue. I pretty much got this character changing working as intended with some oddities here and there (like how my health bar is not showing on the top right corner when I take damage) but I can live with it. Thanks to everyone who helped!

Make a script or search a script