Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make a part grow only up?

I found this tweensize script

local TweenService = game:GetService("TweenService")
local Part = script.Parent

local info = TweenInfo.new(
	5, 
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.Out,
	0,
	false,
	0
)
wait(3)
local Goals = 
	{
		Size = Vector3.new(2,2,1);
	}

local MakePartBigger = TweenService:Create(Part, info, Goals)

wait(5)
MakePartBigger:Play() 

The problem is that the part grows in both directions, up and down an i need it to only grow up what should i do?

3 answers

Make sure to add half of the part y axis size to the position/cframe

Lets say

goals.Size = Part.Size + Vector3.new(10,50,20)
goals.CFrame = Part.CFrame + CFrame.new(0,-25,0)

Vector3.new(0,y,0) just use axis y if you want up and down

4 comments

0

No, you- I mean, the part grows in both directions, imagine a torso, right? place this flat part in waist area, the part will grow to the center of torso and center and legs and not to the shoulders

0

of legs*

0

Plus the part just becomes flat and tall if we just use two 0's.

0

use this part.size=leftleg.Size/2+humanoidrootpart.Size/2, part.position = humanoid.Position+humanoidrootpart.Size/2

Ok for this you need to grow it specificly on the y axis, so for example if you're doing script.Parent.Size = Vector3.new(2, 2, 1) the middle number is the y axis, so you would only make the middle number go higher. Just incase if you still don't understand I'll put the fixed code in.~~~~~~~~~~~~~~~~~ local TweenService = game:GetService("TweenService") local Part = script.Parent

local info = TweenInfo.new( 5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) wait(3) local Goals = { Size = Vector3.new(0,2,0); }

local MakePartBigger = TweenService:Create(Part, info, Goals)

wait(5) MakePartBigger:Play()


1 comment

0

I'm just gonna copypaste my reply on another same answer: No, you- I mean, the part grows in both directions, imagine a torso, right? place this flat part in waist area, the part will grow to the center of torso and center of legs and not to the shoulders. Plus the part just becomes flat and tall if we just use two 0's.

This discussion is preserved as it was. New answers, comments, and votes are closed.