R6 Rig Scaling? (For certain users)

Is it possible to scale down an R6 character? Doing my own research, some people say it isn’t possible while I see posts like this: How do I scale hats w/ R6 scaling?
Reading this post it seemed to be concluded with scaling to be not possible Scaling R6 Models

I’m pretty sure modules like Kohls Admin can scale down R6 rigs as well, how can I accomplish this?

5 Likes

Are you saying you want to scale down a rig with no hats just body parts or a character with accessories, etc?

Yes, just a character with body parts.

(I plan to morph the character)

Can’t you just use the resize tool? Or are you asking how to set a default size for all players that join the game?

I meant when a player joins a game they get resized.

(Sorry if that wasn’t clear before)

Ah now I understand and its alright.
The video below shows how to do it.

I only need it set for certain users, for example

if player.Name == "MikeAnchose" then
--resize it
end

(I don’t want it for every player)

Oh i’m not a scripter and I don’t know how to do that sorry and you may want to add into your topic the “for certain users” part it really got me confused since it wasn’t there.

Oh ok, thanks for your support anyways.

1 Like

I found the solution!
I did indeed find this through a Free Model so credits to hunxrepair

Here is the script for future references along with the model.
https://www.roblox.com/library/1239655916/R6-Character-Scaling

local Percentage = 0.3 -- 1 = normal, 0.5 = half your normal size, 2 = double your normal size
local LastGrowth = 0

script.Parent.Touched:Connect(function(Hit)
	if time() - LastGrowth > 1 then
		LastGrowth = time()
	
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		
		if Player and Player.Character:FindFirstChild("AppliedGrowth") == nil then
			local Motors = {}
			local NewMotors = {}
			local NewVal = Instance.new("BoolValue")
			NewVal.Name = "AppliedGrowth"
			NewVal.Parent = Player.Character
			
			
			for i,v in pairs(Player.Character.Torso:GetChildren()) do
				if v:IsA("Motor6D") then
					table.insert(Motors, v)
				end
			end
			table.insert(Motors, Player.Character.HumanoidRootPart.RootJoint)
			
			for i,v in pairs(Motors) do

				local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C0:components()
				X = X * Percentage
				Y = Y * Percentage
				Z = Z * Percentage
				R00 = R00 * Percentage
				R01 = R01 * Percentage
				R02 = R02 * Percentage
				R10 = R10 * Percentage
				R11 = R11 * Percentage
				R12 = R12 * Percentage
				R20 = R20 * Percentage
				R21 = R21 * Percentage
				R22 = R22 * Percentage
				v.C0 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
				
				local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C1:components()
				X = X * Percentage
				Y = Y * Percentage
				Z = Z * Percentage
				R00 = R00 * Percentage
				R01 = R01 * Percentage
				R02 = R02 * Percentage
				R10 = R10 * Percentage
				R11 = R11 * Percentage
				R12 = R12 * Percentage
				R20 = R20 * Percentage
				R21 = R21 * Percentage
				R22 = R22 * Percentage
				v.C1 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
				
				table.insert(NewMotors, {v:Clone(), v.Parent})
				v:Destroy()
			end
			
			for i,v in pairs(Player.Character:GetChildren()) do
				if v:IsA("BasePart") then
					v.Size = v.Size * Percentage
				end
			end
			
			for i,v in pairs(NewMotors) do
				v[1].Parent = v[2]
			end
			
			
		end
	end
end)
18 Likes

Was the script able to resize accessories as well? I tried using this script and it only scales the rig’s limbs/body parts.

Replace Player.Character:GetChildren() with Player.Character:GetDescendants() when it is searching for if v:IsA("BasePart").

I seem to have a problem when scaling using this script.

Even I followed your advice, it does not scale the accessories (and the head). As you can see on the image.

(I used percentage = 2)

local Percentage = 2

Screen Shot 2022-02-02 at 3.12.15 pm

Does anyone have a better way to scale R6?

Aight, it’s fixed now, here’s my script:

local Percentage = 0.3 -- 1 = normal, 0.5 = half your normal size, 2 = double your normal size
local LastGrowth = 0

script.Parent.Touched:Connect(function(Hit)
	if time() - LastGrowth > 1 then
		LastGrowth = time()
	
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		
		if Player and Player.Character:FindFirstChild("AppliedGrowth") == nil then
			local Motors = {}
			local NewMotors = {}
			local NewVal = Instance.new("BoolValue")
			NewVal.Name = "AppliedGrowth"
			NewVal.Parent = Player.Character
			
			
			for i,v in pairs(Player.Character.Torso:GetChildren()) do
				if v:IsA("Motor6D") then
					table.insert(Motors, v)
				end
			end
			table.insert(Motors, Player.Character.HumanoidRootPart.RootJoint)
			
			for i,v in pairs(Motors) do

				local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C0:components()
				X = X * Percentage
				Y = Y * Percentage
				Z = Z * Percentage
				R00 = R00 * Percentage
				R01 = R01 * Percentage
				R02 = R02 * Percentage
				R10 = R10 * Percentage
				R11 = R11 * Percentage
				R12 = R12 * Percentage
				R20 = R20 * Percentage
				R21 = R21 * Percentage
				R22 = R22 * Percentage
				v.C0 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
				
				local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C1:components()
				X = X * Percentage
				Y = Y * Percentage
				Z = Z * Percentage
				R00 = R00 * Percentage
				R01 = R01 * Percentage
				R02 = R02 * Percentage
				R10 = R10 * Percentage
				R11 = R11 * Percentage
				R12 = R12 * Percentage
				R20 = R20 * Percentage
				R21 = R21 * Percentage
				R22 = R22 * Percentage
				v.C1 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
				
				table.insert(NewMotors, {v:Clone(), v.Parent})
				v:Destroy()
			end
			
			for i,v in pairs(Player.Character:GetDescendants()) do
				if v:IsA("BasePart") then
					v.Size = v.Size * Percentage
					local specialMesh = v:FindFirstChild("Mesh")
					if specialMesh then
						specialMesh.Scale = specialMesh.Scale * Percentage
					end
				end
			end
			
			for i,v in pairs(NewMotors) do
				v[1].Parent = v[2]
			end
			
			
		end
	end
end)

If you use that, it might make your head too small, heres an updated script i use:

local Percentage = .3
function b(Hit)
	local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
	if Player then
		local Motors = {}
		local NewMotors = {}
		for i,v in pairs(Player.Character.Torso:GetChildren()) do
			if v:IsA("Motor6D") then
				table.insert(Motors, v)
			end
		end
		table.insert(Motors, Player.Character.HumanoidRootPart.RootJoint)
		for i,v in pairs(Motors) do
			local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C0:components()
			X = X * Percentage
			Y = Y * Percentage
			Z = Z * Percentage
			R00 = R00 * Percentage
			R01 = R01 * Percentage
			R02 = R02 * Percentage
			R10 = R10 * Percentage
			R11 = R11 * Percentage
			R12 = R12 * Percentage
			R20 = R20 * Percentage
			R21 = R21 * Percentage
			R22 = R22 * Percentage
			v.C0 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
			local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C1:components()
			X = X * Percentage
			Y = Y * Percentage
			Z = Z * Percentage
			R00 = R00 * Percentage
			R01 = R01 * Percentage
			R02 = R02 * Percentage
			R10 = R10 * Percentage
			R11 = R11 * Percentage
			R12 = R12 * Percentage
			R20 = R20 * Percentage
			R21 = R21 * Percentage
			R22 = R22 * Percentage
			v.C1 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
			table.insert(NewMotors, {v:Clone(), v.Parent})
			v:Destroy()
		end
		for i,v in pairs(Player.Character:GetDescendants()) do
			if v:IsA("BasePart") then
				v.Size = v.Size * Percentage
			elseif v:IsA("SpecialMesh") and v.MeshType == Enum.MeshType.FileMesh then
				v.Scale = v.Scale * Percentage
			elseif v:IsA("Weld") and v.Name == "AccessoryWeld" then
				local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C0:components()
				X = X * Percentage
				Y = Y * Percentage
				Z = Z * Percentage
				R00 = R00 * Percentage
				R01 = R01 * Percentage
				R02 = R02 * Percentage
				R10 = R10 * Percentage
				R11 = R11 * Percentage
				R12 = R12 * Percentage
				R20 = R20 * Percentage
				R21 = R21 * Percentage
				R22 = R22 * Percentage
				v.C0 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
				local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C1:components()
				X = X * Percentage
				Y = Y * Percentage
				Z = Z * Percentage
				R00 = R00 * Percentage
				R01 = R01 * Percentage
				R02 = R02 * Percentage
				R10 = R10 * Percentage
				R11 = R11 * Percentage
				R12 = R12 * Percentage
				R20 = R20 * Percentage
				R21 = R21 * Percentage
				R22 = R22 * Percentage
				v.C1 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
			end
		end
		for i,v in pairs(NewMotors) do
			v[1].Parent = v[2]
		end
	end
end
script.Parent.Touched:Connect(b)
4 Likes

A bit late but I just wanted to contribute to any future readers.

Since you referred to Kohl’s Admin, I dug around their scripts and found this function in line 1500 which perfectly resizes the character, R15 or R6, as well as all accessories. And all you have to do is pass the character and the scale as parameters.

To your surprise, No Motor6D stuff involved and is actually quite short.

local function resizeCharacter(char, scale)
	local human = char and char:FindFirstChildOfClass("Humanoid")
	if not human then
		return
	end

	local diff = scale / (char:GetAttribute("KCharacterScale") or 1)
	local hipHeight = human.HipHeight + human.RootPart.Size.Y / 2

	if human.RigType == Enum.HumanoidRigType.R15 then
		for _, v in human:GetChildren() do
			if v:IsA("NumberValue") and string.find(v.Name, "Scale") then
				v.Value = scale
			end
		end
	elseif human.RigType == Enum.HumanoidRigType.R6 then
		hipHeight = human.RootPart.Size.Y * 1.5
		for _, v in char:GetDescendants() do
			if v:IsA("BasePart") then
				v.Size *= diff
			elseif v:IsA("JointInstance") then
				v.C0 -= v.C0.Position * (1 - diff)
				v.C1 -= v.C1.Position * (1 - diff)
			elseif v:IsA("SpecialMesh") and v.MeshType == Enum.MeshType.FileMesh then
				v.Scale *= diff
			end
		end
	end
	-- reposition rootpart to prevent falling
	human.RootPart.CFrame *= CFrame.new(0, hipHeight * (diff - 1), 0)
	char:SetAttribute("KCharacterScale", scale)
end
4 Likes