How do I check game settings thru scripts? Like checking the game’s avatar choice if it’s set to R6 or R15. I tried to check the player’s humanoid rigtype and when I put this script into a localscript (in StarterCharacterScripts)…
local character = script.Parent
local humanoid = character:FindFirstChild("Humanoid")
if not character or not humanoid then return end
task.wait(3) if humanoid.RigType == "R15" then
print("Character's humanoid rigtype is R15")
end
if humanoid.RigType == "R6" then
print("Character's humanoid rigtype is R6")
end
…it printed out “R6” although it was set to R15 in the game settings
local humanoid = character:FindFirstChild("Humanoid")
if not character or not humanoid then
return
end
task.wait(3)
if humanoid.RigType.Value == 0 then
print("Character's humanoid rigtype is R6")
else
print("Character's humanoid rigtype is R15")
end
r15’s torso types consists of upper and lower torsos
r6 only consists of “torso”
use those to check what rig type the game is using
local character = script.Parent
local humanoid = character:FindFirstChild("Humanoid")
if not character or not humanoid then return end
task.wait(3) if character:FindFirstChild("UpperTorso") then
print("Character's humanoid rigtype is R15")
else
print("Character's humanoid rigtype is R6")
end
Bumping this thread to say that the correct way to do this is to compare the Humanoid’s RigType using Enum.HumanoidRigType instead of attempting to compare a String value like “R6” or “R15”. Roblox doesn’t store the Humanoid’s RigType as a string, and instead has its own Enum you can use to compare a humanoid’s RigType.
local playerAnim = Instance.new("Animation")
local humanoid = char:FindFirstChildOfClass("Humanoid")
local AnimR15 = --rbxassetid://IdForR15
local AnimR6 = --rbxassetid://IdForR6
playerAnim.AnimationId = if humanoid.RigType == Enum.HumanoidRigType.R15 then AnimR15 else AnimR6