I want to be able to resize a part in a certain direction using tween service. Does anyone know how to do this?
Hello 9_Spy!
Yes, there is a way to do this are you able to show me the script you are using with the TweenSerice?
I currently used Size = Vector3.new() since I don’t know how to use Resize in here.
local info = TweenInfo.new(1.2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local properties = {
Size = Vector3.new(50, 1.419, 1.309),
}
local tween = ts:Create(part, info, properties)
tween:Play()
Does that script work for you?
It works but I want to use
part:Resize(Enum.NormalId.Left, 50)
to tween it
Have you tried this?
[Enum.NormalId.Left] = Vector3.new(0,0,0);
In what place do you mean to put this?
local properties = {
[Enum.NormalId.Left] = Vector3.new(0,0,0),
}
Yeah put it inside of the properties
I tried this but it didn’t work
If this does not work,
Take a look at this website to help you:
I have looked at that beforehand.
local TweenService = game:GetService("TweenService")
local part = game.Workspace.Part
local SizeX = part.Size.X + 50
local info = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 1)
local properties = {
Size = Vector3.new(SizeX, part.Size.Y, part.Size.Z),
Position = Vector3.new((part.Position.X + (-1*(SizeX)/2) + (part.Size.X/2)), part.Position.Y , part.Position.Z)
-- change the + to - if you want it to extend to the right
}
local tween = TweenService:Create(part, info, properties)
tween:Play() -- this is the same as doing part:Resize(Enum.NormalId.Left, 50)
You will have to compensate for the part extending on both sides when tweening the size by shifting its position to the left. Maybe someone else can explain it better
5 Likes