-
What do you want to achieve? Keep it simple and clear!
I’m trying to switch the character’s rig from R15 to R6 seamlessly upon dying.
I did it by using ‘:CreateHumanoidModelFromDescription()’ to switch the rig to R6, Setting the player’s character to the morph after
and ‘:ChangeState’ to kill the character.
-
What is the issue? Include screenshots / videos if possible!
The character glitches for a second before fully switching to R6 and dying.
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve figured it has something to do with changing the Player’s character but i couldn’t find a solution to this.
Humanoid.Died:connect(function()
player.Backpack:ClearAllChildren()
local Tool = character:FindFirstChildWhichIsA("Tool")
if Tool then
Tool:Destroy()
end
if character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
local Main = game.Players:GetHumanoidDescriptionFromUserId(player.CharacterAppearanceId)
local morph = game.Players:CreateHumanoidModelFromDescription(Main, Enum.HumanoidRigType.R6)
morph:SetPrimaryPartCFrame(character.PrimaryPart.CFrame)
morph.Name = player.Name
player.Character = morph
morph.Parent = workspace
morph.Humanoid:ChangeState(Enum.HumanoidStateType.Dead)
end
end
end)