How do i force r6 using a script

requesting server sided support
here is what i have so far

local mike = game.Players:FindFirstChild("mikebramble591")
-- now i wish to make myself r6 rig type

i could do it in studio but its a r15 game and i wish to have myself only be r6 for testing

1 Like

Maybe an R6 StarterCharacter rig and then apply the humanoid description of the player?

Why would you use a script to force R6 if there are game settings to force that?

1 Like

get r6 character from toolbox name it StarterCharacter and put it in StarterPlayer

You have to use a StarterCharacter which is R6

local players = game:GetService("Players")
local getHumanoidDescriptionFromUserId = players.GetHumanoidDescriptionFromUserId
local insert = game:GetService("InsertService")
local loadAsset = insert.LoadAsset
local starterPlayer = game:GetService("StarterPlayer")

local function getR6Avatar()
	local success, result = pcall(loadAsset, insert, 1785197)
	
	if success then
		if result then
			local starterCharacter = result:FindFirstChildOfClass("Model")
			if starterCharacter then
				starterCharacter.Name = "StarterCharacter"
				starterCharacter.Parent = game.StarterPlayer
				result:Destroy()
			end
		end
	else
		warn(result)
	end
end

local function onPlayerAdded(player)
	local function onCharacterAdded(character)
		task.wait(0.5)
		local humanoid = character:WaitForChild("Humanoid")
		local success, result = pcall(getHumanoidDescriptionFromUserId, players, player.UserId)
		if success then
			if result then
				humanoid:ApplyDescription(result)
			end
		else
			warn(result)
		end
	end
	
	player.CharacterAdded:Connect(onCharacterAdded)
end

players.PlayerAdded:Connect(onPlayerAdded)
getR6Avatar()

Here’s a script which automates everything, you won’t even need to insert a model named “StarterCharacter” into the “StarterPlayer” folder.

1 Like

I hate to bump this topic. But I need to know: How do I use this?

Well, that depends on what you want to do

like, i want to force R6 with a script. The entire game.

Game settings can do this for you without a single script:

Take a look at the Avatar Type setting.

AGAIN SORRY FOR THE BUMP

So I’m trying to force it using a script, example below

Player 1: Wears a glove only made for r6
Player 2: Doesn’t need the gloves but is forced to use R6
So, I want player 2 to stay without r6
I’ve got a way to do this, but I just need to know how you would do so with a script.

Try out this solution.

pfft good one

literally everyone knows thats the most unreliable way, setting the avatar type to r6 somehow makes me turn into r15 even tho my avatar is literally r6

thanks for bumping this 2 year old post

the r6 setting works fine for me, never errors or anything

1 Like

why did you necro a 2 year old thread LOL

1 Like

why did you bump a 2 year old thread

not cool man

1 Like