Character Resizer (R6 and R15)

I made a module script which allows to resize character

Here are videos of me resizing two characters (R6 and R15)

Making the character bigger

Making the character smaller

Here is the module: CharacterResizer - Roblox

(if u have questions feel free to ask down bellow in the comment section)

14 Likes

I’ll probably use this for a puzzle game since it supports R6. Pretty much all of my games are R6 and most resources only support R15, so this is a nice change of pace, great work!

I looked over the source code and I want to know why your used:

local module = {}
module.__index = module

Instead of:

local module = {}

I only do the former option when I’m making a module with OOP, and I want to know why you did it when your module isn’t using OOP. Just for clarification, I know very little about metamethods, and I only really use __index.

2 Likes
  1. I like to make things pointless
  2. module.__index = module looks more complex and epic
4 Likes

I do that all the time, for no real reason other than to make me look smarter. (But not with metamethod since I have no clue what I am doing when I use them).

3 Likes

What does this do to resize characters? Also noice plugin

Also, pretty crazy that you’re a beginner and learned module scripts

1 Like

Thanks

local module = {}
module.__index = module

function module.ResizeCharacter(givenModel,scale)
	local Humanoid = givenModel:FindFirstChild("Humanoid")
	if Humanoid then
		if Humanoid.RigType == Enum.RigType.R15 then
			if Humanoid:FindFirstChild("HeadScale") then
				local HS = Humanoid.HeadScale
				local BDS = Humanoid.BodyDepthScale
				local BWS = Humanoid.BodyWidthScale
				local BHS = Humanoid.BodyHeightScale

				HS.Value = HS.Value * scale
				BDS.Value = BDS.Value * scale
				BWS.Value = BWS.Value * scale
				BHS.Value = BHS.Value * scale
			else
				error("Not compatible character (BodyScale missing)")
				return 
			end
		else
			local halfHMRSize = (givenModel.HumanoidRootPart.Size.Y / 2)
			for _, i in pairs(givenModel:GetDescendants()) do
				if i:IsA("BasePart") and i.Name ~= "HumanoidRootPart" then
					local wasCanCollide = i.CanCollide
					i.CanCollide = false
					i.Size = i.Size * scale
					i.CanCollide = wasCanCollide
				elseif i:IsA("FileMesh") and (not i:IsA("SpecialMesh") or i.MeshType == Enum.MeshType.FileMesh) then
					i.Scale = i.Scale * scale
				elseif i:IsA("JointInstance") then
					local wasAnchored = i.Part1.Anchored
					i.Part1.Anchored = false
					i.C0 = i.C0 - (i.C0.p * (1 - scale))
					i.C1 = i.C1 - (i.C1.p * (1 - scale))
				elseif i:IsA("Attachment") then
					i.Position = i.Position * scale
				elseif i:IsA("Pose") then
					i.CFrame = i.CFrame - (i.CFrame.p * (1 - scale))
				elseif i:IsA("Humanoid") then
					i.HipHeight = (i.HipHeight + halfHMRSize) * scale - halfHMRSize
				end
			end
		end
	end
end

The r15 resizer is nothing special (it uses the usual resizing method for r15)
The r6 resizes each part and scales each mesh. The module also changes pose cframe,attachments cframe,Joints cframe and sets humanoid hip height

Thats all

how did you script this while being a beginner

Noice code

Also suggestion:

-- pairs is slower than ipairs, so use ipairs
-- like this
for _,I in ipairs(table) do
2 Likes

I’ve did some research thats all
Thanks for the suggestion

Is there a way it could be made where it only extends the Height. Making it look like its getting taller instead of over-all changing its width and depth.

i actually got module separate module for r6 which does that
https://www.roblox.com/library/9085032094/ResizerPro

Does it change Accessory Size too?

yes, it changes meshes size but not special once since its not really accurate

Sorry for such a late reply, but how do I activate or where do I put this script? It’s not altering my height anywhere I put it.