Roblox News Survey 2014

Win a game on Steam!

Friday, September 28, 2012

Tween Position & Size

Before anything, I did post this by my own accord. Because I thought you, the readers would want to hear from me ASAP!

Tweening position:

script.Parent.Frame:TweenPosition(, 0, 0.5, 0))

This would put the frame in the parent of the script to the position of 5 by 5, also meaning that you would not have to use any long scripts.

Lets take a closer look...

script.Parent.Frame:TweenPosition(, 0, 0.5, 0))

'script.Parent.Frame' - locating the frame.

:TweenPosition() - the method used to move a gui to a position in a manner smooth and risk-free., 0, 0.5, 0) - defining the position you want the gui to be at by the end of the tweening.

Tweening the position is one of the most easy ways to move a Gui smoothly. Even an idiot could use this method. It helps a lot, you could also choose the manner you wish for it to enter, you could make it bounce with 'script.Parent.Frame:TweenPosition(0.5, 0, 0.5, 0), "Out", "Bounce")'. This would bounce the gui when it reaches it's destination. Although the bounce method doesn't give of a sound unless you have scripted it, it's still a very nice way to have a Gui move itself in.
Tweening can also involve size, even sizeandposition, but I think if you know Size and Position, you could easily use "PositionAndSize". Size is the same as position, but instead of saying TweenPosition, the hardest bit is changing TweenPosition to TweenSize.
Both TweenSize and TweenPosition come in handy when making a game, the enums are even better. With Tweening, you can choose how long you with the gui to take before it reaches it's destination, for a smoother tween you could set it as a high number of seconds, whereas if you were using a small time you would reach the destination quicker.


With this method, I personally have a suggestion that they make "TweenPartPosition" and "TweenPartSize" making it easier for us, the users to move bricks to a different position in a better transition than making everything run from a for loop or so.

My Opinion

In my opinion, Gui Tweening is a great addition to ROBLOX, and they should carry on making options like it. Great job!

Review News

Sorry about my delay, I should have one up and running today, I have actually been really busy with programming, I mean, yesterday I learnt a whole programming language in one day. And I was too tired to carry on blogging for that day. So if you are reading this tomorrow then there's probably a review up. :)

"Did you know, place reviewing is the best department?"