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

How to make a Frame scale vertically?

I'm trying to make mana bar but i'm struggling to make it scale vertically, i'm doing the following:

frame:TweenSize(UDim2.new(mana.Value,0,0,29),"In","Linear",.1)

I want the mana bar to scale vertically, how to fix this?

1 comment

0

I think the problem is the 1st and 3rd variable in UDim2.new() are the x and y scales, 0 is your y-scale

1 answer

Here is my fix, hope it helps!

local frame = script.Parent
frame.AnchorPoint = Vector2.new() --insert anchor point in the ( )
frame.Position = UDim2.new() --insert position in the ( )
 
frame:TweenSize(UDim2.new()[[--insert the size it is going to be after the tween in the ( )--]])

From what i found you can't use styles when doing a TweenSize but that's what i found. If it does, comment on this answer it does and i'll fix the script.

1 comment

0

the position and anchor point is actually optional i just always write it in my script when tweening gui but its your choice if you want to delete it. Just remember don't delete anything else unless it's a comment, even the ) at the end don't delete that.

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