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

Tween is only working if you put an event ?

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

2 comments

0

show me your script or i cant help m8

0

This is the script is not working script.Parent:TweenPosition(UDim2.new(0,598,0.363,0),"Out","Bounce",1,false)

3 answers

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

2 comments

0

Thanks man for the info So Could I I to it like Game.Players.PlayersAdded:connect(function() and then the tweening

0

Yes

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.

2 comments

0

Ok thanks bro

0

But How Do I do it Without MouseButton1click

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)

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