Increasing and decreasing NPC Size with TweenService

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

A server script to increase the size of an NPC by 4x and then reduce it back to original size.

  1. What is the issue? Include screenshots / videos if possible!

The code works great on players in the game, but for NPC Models the enlarged model sinks halfway into the ground.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I looked through many posts. It appears there needs to be some adjustment to the position but I haven’t had any success moving the model’s cframe either before the tween - it ends up being a sequence where the model is moved upwards and then enlarged. I would like it to be a smooth enlargement with the NPC’s feet remaining on the ground.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

The code below is in a server script contained in the NPC model.

local char = script.Parent
local humanoid = char.Humanoid
local hrp = char.HumanoidRootPart
local TweenService = game:GetService("TweenService")
local humanoid = script.Parent.Humanoid -- replace 'NPC' with the name of your NPC model

local TweenService = game:GetService("TweenService")
TweenService:Create(humanoid.HeadScale,, {Value = 4}):Play()
TweenService:Create(humanoid.BodyDepthScale,, {Value = 4}):Play()
TweenService:Create(humanoid.BodyWidthScale,, {Value = 4}):Play()
TweenService:Create(humanoid.BodyHeightScale,, {Value = 4}):Play()


TweenService:Create(humanoid.HeadScale,, {Value = 1}):Play()
TweenService:Create(humanoid.BodyDepthScale,, {Value = 1}):Play()
TweenService:Create(humanoid.BodyWidthScale,, {Value = 1}):Play()
TweenService:Create(humanoid.BodyHeightScale,, {Value = 1}):Play()

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Will this be any help for you?
Took me 10-20 minutes to type/test…

local tweenService = game:GetService("TweenService")

local function ChangeSizeFunction(character, changeSizeTable)
	local humanoid = character:WaitForChild("Humanoid")
	if humanoid then
		if not humanoid:FindFirstChild("BodyHeightScale") then
			local bodyHeightScale ="NumberValue")
			bodyHeightScale.Name = "BodyHeightScale"
			bodyHeightScale.Parent = humanoid
			bodyHeightScale.Value = 1
			tweenService:Create(bodyHeightScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.height}):Play()
			tweenService:Create(humanoid.BodyHeightScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.height}):Play()
		if not humanoid:FindFirstChild("BodyWidthScale") then
			local bodyWidthScale ="NumberValue")
			bodyWidthScale.Name = "BodyWidthScale"
			bodyWidthScale.Parent = humanoid
			bodyWidthScale.Value = 1
			tweenService:Create(bodyWidthScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.width}):Play()
			tweenService:Create(humanoid.BodyWidthScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.width}):Play()
		if not humanoid:FindFirstChild("BodyDepthScale") then
			local bodyDepthScale ="NumberValue")
			bodyDepthScale.Name = "BodyDepthScale"
			bodyDepthScale.Parent = humanoid
			bodyDepthScale.Value = 1
			tweenService:Create(bodyDepthScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.depth}):Play()
			tweenService:Create(humanoid.BodyDepthScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.depth}):Play()
		if not humanoid:FindFirstChild("HeadScale") then
			local headScale ="NumberValue")
			headScale.Name = "HeadScale"
			headScale.Parent = humanoid
			headScale.Value = 1
			tweenService:Create(headScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.headSize}):Play()
			tweenService:Create(humanoid.HeadScale, changeSizeTable.tweenInformation, {Value = changeSizeTable.headSize}):Play()

local character = script.Parent

local changeSizeTable = 
	tweenInformation =, Enum.EasingStyle.Linear, Enum.EasingDirection.In),
	height = 4, width = 4, depth = 4, headSize = 4,
local changeSizeTable2 = 
	tweenInformation =, Enum.EasingStyle.Linear, Enum.EasingDirection.In),
	height = 1, width = 1, depth = 1, headSize = 1,

ChangeSizeFunction(character, changeSizeTable)
ChangeSizeFunction(character, changeSizeTable2)
1 Like