How to get RigType from imported HumanoidDescription?

Hello, I am trying to import a player’s HumanoidDescription. I have done this, but I have run into problems like these:
rigtypeBug
Is there anyway to know the RigType from the HumanoidDescription and not the humanoid?
Or, is there any API I can use to check if the imported player is R6 or R15?

No. Why can’t you check from the humanoid?

It always returns “R6”… Whenever I switch it to R15, it kills the character… I only have the R6 animate script right now, but before applying the HumanoidDescription, is there any way of checking if it is R15 or R6, so I can parent the right Animate script?

That must be something else that’s causing that. Are you trying to apply a HumanoidDescription instance that contains data for an R6 rig onto a R15 rig?

check if the player has a torso or not.
example:

If Character:FindFirstChild("Torso") then
     print("Is R6")
else
     print("Is R15")
1 Like

It’s an imported HumanoidDescription from the User’s Id… I don’t think it contains data for an R6 rig or an R15 rig?

event:FireServer(UserInfo.Id)
local event = game:GetService("ReplicatedStorage"):WaitForChild("TargetAvatarEvent")
local players = game:GetService("Players")
local cd = workspace:WaitForChild("CopyChar"):WaitForChild("Copy")
event.OnServerEvent:Connect(function(plr,id)
	--print(name)
	local dummyHumanoid = workspace:FindFirstChild("TargetDummy"):WaitForChild("Humanoid")
	local desc = players:GetHumanoidDescriptionFromUserId(id)
	dummyHumanoid:ApplyDescriptionReset(desc)
	print(tostring(dummyHumanoid.RigType)) -- R6
	--[[for _,part in pairs(dummyHumanoid.Parent:GetChildren()) do
		if part:IsA("Part") then
			part.CanCollide = false
		end
	end]]
end)

But that’s the problem… it always returns R6

Try @iM1GHTB3DANI method, it might work since that’s another way to distinguish between R6 and R15 rigs.

R15 has lowertorso and uppertorso, R6 only has torso

Tried importing an R15 avatar… it has a torso.
image_2023-02-27_185856481

thats not r15… that is still r6

1 Like

Are you sure you clicked the right button? That’s not R15.

I tried importing an R15 avatar into my game… it results in R6?

How do you import your characters?

1 Like

event:FireServer(UserInfo.Id)
local event = game:GetService("ReplicatedStorage"):WaitForChild("TargetAvatarEvent")
local players = game:GetService("Players")
local cd = workspace:WaitForChild("CopyChar"):WaitForChild("Copy")
event.OnServerEvent:Connect(function(plr,id)
	--print(name)
	local dummyHumanoid = workspace:FindFirstChild("TargetDummy"):WaitForChild("Humanoid")
	local desc = players:GetHumanoidDescriptionFromUserId(id)
	dummyHumanoid:ApplyDescriptionReset(desc)
	print(tostring(dummyHumanoid.RigType)) -- R6
	--[[for _,part in pairs(dummyHumanoid.Parent:GetChildren()) do
		if part:IsA("Part") then
			part.CanCollide = false
		end
	end]]
end)

A rather hackier solution to this problem would be to download the character for that ID and detect the humanoid’s rig type in there.

I believe the Players service has that function as well.

@iM1GHTB3DANI can you help check the video? I cant see it.

Which function? Also what do you mean to download the character?

I seem to have found a function in the Players service that tells the RigType… I’ll test if this works or not.
If you are having the same problems then game:GetService("Players"):GetCharacterAppearanceInfoAsync(id)
Nevermind, it just kills the dummy…

I believe they’re referring to Players:CreateHumanoidModelFromUserId.

local model = Players:CreateHumanoidModelFromUserId(1)
model.Parent = workspace

-- Creates a character model using Roblox's avatar