Delete a line
humanoid.RigType = "R6"
that’s why your character is dying, because if for example you have r15 rig then there wouldn’t be joints to sustain the r6 rig, same goes for r6. Also if you wish to set a r6 avatar for all new players, you’ll have to do it in game settings manually. But allas if you even read this post, heres a script:
local newjoint=Instance.new('Motor6D')
function ConvertToR6(Character:Model)
local JointTable={}
local hrp=Character:FindFirstChild('HumanoidRootPart')
local torso=hrp:Clone()
torso.Name='Torso'
torso.CFrame=hrp.CFrame
torso.Parent=Character
local torsojoint=newjoint:Clone()
torsojoint.Parent=hrp
torsojoint.Part0=hrp
torsojoint.Part1=torso
torsojoint.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(-90),math.rad(-180),0)
local ra=Instance.new('Part',Character)
ra.Name='Right Arm'
ra.CFrame=hrp.CFrame
ra.Size=Vector3.new(1, 2, 1)
local rightarm = newjoint:Clone()
rightarm.Name="Right Shoulder"
rightarm.Part0=torso
rightarm.Part1=ra
rightarm.C1=CFrame.new(-0.5,0.5,0)*CFrame.Angles(0,math.rad(90),0)
rightarm.C0=CFrame.new(1,0.5,0)*CFrame.Angles(0,math.rad(90),0)
local la=Instance.new('Part',Character)
la.Name='Left Arm'
la.CFrame=hrp.CFrame
la.Size=Vector3.new(1, 2, 1)
local leftarm = newjoint:Clone()
leftarm.Name="Left Shoulder"
leftarm.Part0=torso
leftarm.Part1=la
leftarm.C1=CFrame.new(0.5,0.5,0)*CFrame.Angles(0,math.rad(-90),0)
leftarm.C0=CFrame.new(-1,0.5,0)*CFrame.Angles(0,math.rad(-90),0)
local ll=Instance.new('Part',Character)
ll.Name='Left Leg'
ll.CFrame=hrp.CFrame
ll.Size=Vector3.new(1, 2, 1)
local leftleg = newjoint:Clone()
leftleg.Name="Left Hip"
leftleg.Part0=torso
leftleg.Part1=ll
leftleg.C1=CFrame.new(-0.5,1,0)*CFrame.Angles(0,math.rad(-90),0)
leftleg.C0=CFrame.new(-1,-1,0)*CFrame.Angles(0,math.rad(-90),0)
local rl=Instance.new('Part',Character)
rl.Name='Right Leg'
rl.CFrame=hrp.CFrame
rl.Size=Vector3.new(1, 2, 1)
local rightleg = newjoint:Clone()
rightleg.Name="Right Hip"
rightleg.Part0=torso
rightleg.Part1=rl
rightleg.C1=CFrame.new(0.5,1,0)*CFrame.Angles(0,math.rad(90),0)
leftleg.C0=CFrame.new(1,-1,0)*CFrame.Angles(0,math.rad(90),0)
local head=Character:FindFirstChild('Head')
local neck = newjoint:Clone()
neck.Name="Neck"
neck.Part0=torso
neck.Part1=head
neck.C1=CFrame.new(0,-0.5,0)*CFrame.Angles(math.rad(-90),math.rad(-180),0)
neck.C0=CFrame.new(0,1,0)*CFrame.Angles(math.rad(-90),math.rad(-180),0)
table.insert(JointTable,torso)
table.insert(JointTable,hrp)
table.insert(JointTable,rl)
table.insert(JointTable,ll)
table.insert(JointTable,la)
table.insert(JointTable,ra)
table.insert(JointTable,head)
for i,v in pairs(Character:GetChildren()) do
if not table.find(JointTable,v,1) and (v:IsA('Part')) or (v:IsA('MeshPart')) then
v:Destroy()
end
end
end