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

GUI Tweening?

Asked by
Uroxus 350 Moderation Voter
9 years ago

Would someone be able to explain how to start with GUI tweening? I've read this but it doesn't really help. Where would I start trying to make when a player clicks a button another box pops up in the middle of the screen?

Im not asking for scripts, just a hint in the right direction would be just as helpful :D Thanks :)

1 answer

Log in to vote
0
Answered by 9 years ago

Well, it depends. If you just wish for a GUI to appear when you click a button, then tweening is not necessary. Tweening is to make the GUIs transition on, like an animation.

For example, this would open a GUI when the button is clicked:

function onClick()
    if script.Parent.Parent.GUI.Visible == false then
    script.Parent.Parent.GUI.Visible = true
end

script.Parent.MouseButton1Click:connect(onClick)

If you wish to make the GUI tween onto the screen, you would have to do a few things.

Whenever I tween GUIs, I always make the GUI invisible and make it off the screen in the direction I wish it to tween from. Then, when a button is clicked or the function is called, the GUI becomes visible and tweens onto the screen without me having to set its position off-screen first.

Reading the article you linked is useful for tweening, but I do not suggest it until you are more familiar with GUIs.

0
Yeah, I have buttons that look quite nice so need some kind of animation for the GUIs that appear when you click them. But thanks, this helped :) Uroxus 350 — 9y
Ad

Answer this question