I found this article which has an amazing script that works perfectly as a tweened alternative to :Resize(). However, a note in the script says to “change the + to - if you want it to extend to the right”. I have tried every possible combination of changing + to - (since the note is not specific about which ones to change) cause I need it to extend to the right. Am I missing something… please help.
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)
Works great! One more question. When the player is walking while the flag is growing or the idle animation players or anything it repositions itself (obviously since the tween is changing the position). How can I make it so it can not move from the original position on the tool? I hope that makes sense if not I can provide a visual demonstration.
Youll have to mess with it a bit but basically just change Position to C0 and Vector3 to CFrame
You might have to change it from the x to the y or z of the cframe.new though