Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make a part grow only up?

Asked by
Glvt102 11
3 years ago

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

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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)
Ad
Log in to vote
0
Answered by 3 years ago

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

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 Glvt102 11 — 3y
0
of legs* Glvt102 11 — 3y
0
Plus the part just becomes flat and tall if we just use two 0's. Glvt102 11 — 3y
0
use this part.size=leftleg.Size/2+humanoidrootpart.Size/2, part.position = humanoid.Position+humanoidrootpart.Size/2 lehoaiquoc248 23 — 3y
Log in to vote
0
Answered by
VVTF_RU 18
3 years ago

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() ~~~~~~~~~~~~~~~~~

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. Glvt102 11 — 3y

Answer this question