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

Gui Help? [Script Included]

Asked by
Vividex 162
10 years ago

How do you changes the size of a gui vertically but doesn't change the bottom size of the gui, but it does it smoothly and randomly up to a certain size? I get that you would most likely use UDim2 but it never works for me, help?

script.Parent.Frame.Size = UDim2.new.math.random(0,100,0,550)

I seem pretty dumb right now if I think thats all I need, but it doesn't do anything. Right now the size is set to (0,100,0,0) and its positioned at (0, 20,0, 560), It doesnt do anything, and if it did work, it probably would change the size of the bottom too. Help?

1 answer

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago

-- edit to fit your response

while true do
    local random_size_y = math.random(10, 200)
    script.Parent.Frame:TweenSizeAndPosition(UDim2.new(0,100,0,-random_size_y), UDim2.new(.5,-50,.5,0),"Out", "Linear", 1, true)
    wait(1)
end
0
Still doesn't work, but thanks for replying! I was talking about something kind of like this: http://imgur.com/8yEVVyf like how the frames move up and down randomly two a certain limit Vividex 162 — 10y
Ad

Answer this question