Hello,
Today i want to know, How to use Part:Resize() with tween service because i want to tween part size but wanna resize like the Studio resize tool.
Thanks.
Hello,
Today i want to know, How to use Part:Resize() with tween service because i want to tween part size but wanna resize like the Studio resize tool.
Thanks.
Tested this and I think this is what you wanted. It tweens it just like you were to hold shift and resize a part. You can view more on TweenService
here: TweenService | Documentation - Roblox Creator Hub, TweenService | Documentation - Roblox Creator Hub
-- Services
local tweenService = game:GetService("TweenService")
-- Variables
local part = workspace.Part
-- Tweens
local tweenInfo = TweenInfo.new(10, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out, 0 , false)
local tweenGoals = { Size = Vector3.new(50,50,50) }
local tween = tweenService:Create(part, tweenInfo, tweenGoals)
wait(10)
tween:Play()
When you say you want it to resize like the “Studio resize tool”, do you mean that you want one side to elongate but the other side to stay in the same position? If so then you want to use @Revitic 's code but also Tween the Position at the same time so that only one side appears to move.
I’ll test it today!!
Thanks for answer.
I think it doesn’t different…
The position also doesn’t move like @XdJackyboiiXd21 said.
I want it to be like doesn’t hold any key in studio
You need to add another parameter in the tweenGoals to tween the size too. That way as the part gets larger, it also moves to the side, making it appear like only one side is moving.
if you’re tweening the size of the z axis, tween the position at the same axis and divide it by 2…depending on the direction you might want to use minus (-) or not