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

Tween is only working if you put an event ? [closed]

Asked by 7 years ago

Hello there So Recently Ive been Trying to tween my gui but it only tweens if a Put a an mousebutton1click event Without no events it does not tween please help me I want it to tween auto

0
show me your script or i cant help m8 greatneil80 2647 — 7y
0
This is the script is not working script.Parent:TweenPosition(UDim2.new(0,598,0.363,0),"Out","Bounce",1,false) activatesenju 2 — 7y

Closed as Not Constructive by PyccknnXakep, Azarth, abnotaddable, and hiimgoodpack

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

3 answers

Log in to vote
0
Answered by 7 years ago

In order to use tween, you must call it in some way

For example, you could use anything along the lines of

script.Parent.MouseButton1Click:connect(function)

But you MUST call a tween in order for it to work

0
Thanks man for the info So Could I I to it like Game.Players.PlayersAdded:connect(function() and then the tweening activatesenju 2 — 7y
0
Yes KennySfromTitan 106 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

If you tweening the position then use :TweenPosition()

script.Parent.MouseButton1Click:connect(function()
    GUI:TweenPostion(Udim2.new(0,0,0,0), 0, 0, 0.5, false) -- To position, Easing Style, Easy Direction, Time it will take to reach, if it will overlap another tween.
end

Link

If you tweening the size then use :TweenSize()

script.Parent.MouseButton1Click:connect(function()
    GUI:TweenPostion(Udim2.new(1,0,1,0), 0, 0, 0.5, false)
-- To size, Easing Style, Easy Direction, Time it will take to reach, if it will overlap another tween.
end

Link

Else if you want Size and Position.

0
Ok thanks bro activatesenju 2 — 7y
0
But How Do I do it Without MouseButton1click activatesenju 2 — 7y
Log in to vote
0
Answered by
commag 228 Moderation Voter
7 years ago

If you needed it to tween with mouse button 1 click, you just have to do something like (assuming the script is in the thing you want to be clicked):

script.Parent.MouseButton1Click:connect(function()

--tween here

end)