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

tween service glitching mouse button 1 click?

Hello im having problem with this so i click text button and the buttons need to go to that position but it does not or just some come how can i fix that?


 Removed for security cause someone already stole it

3 comments

0

can u send a gif?

0

Create the function first before running it, by that I mean place the function above the event, if that doesn't work try to post a gif so we could know more.

1 answer

✓ Accepted answer

Your issue here is that your GUIs have not finished moving before you make them move again. e.g.

button:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "In", "Linear", 2) -- this makes button move for 2 seconds
-- but i try to make it move again before it finishes moving
wait(1.5) 
-- this will NOT work because the previous tween hasn't finished
button:TweenPosition(UDim2.new(0, 0, 0, 0), "In", "Linear", 1) 

You can fix this by simply setting the override argument to true. When override is set to true, other TweenPositions can override the current tween that is playing. The override argument is after the time argument. Here's an example code:

button:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "In", "Linear", 2, true)
wait(1.5) 
button:TweenPosition(UDim2.new(0, 0, 0, 0), "In", "Linear", 1) 

So just add true after the time in each of your TweenPosition functions and it should work.

Hope this helps.

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