I want to change a player’s character to another using player.Character. However, I’m experiencing many issues such as:
The camera not being centred on the new character
The new character is not playing any animations
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?
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?
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.
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!