SANYAA_BL9
(DontBreathIFarted)
September 9, 2024, 7:16pm
1
so i wanted to make a ui hiding with a button but animation has a desync because of my tweens runs not at the same time can someone help me?
module script:
function HideBottomButtons.Hide(button: GuiButton, frame: Frame)
local buttonTween = TweenService:Create(button, TweenInfo.new(0.75, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {Position = UDim2.new(0.475, 0, .9, 0)})
local buttonTween2 = TweenService:Create(button, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {Rotation = -90})
local frameTween = TweenService:Create(frame, TweenInfo.new(0.75, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {Position = UDim2.new(0.5, 0, 1.5, 0)})
buttonTween:Play()
buttonTween2:Play()
frameTween:Play()
end
2 Likes
use coroutines or task.spawn
1 Like
sonic_848
(killer)
September 9, 2024, 9:04pm
3
Tweens don’t yield so that probably isn’t it
1 Like
Maybe you should try to use Parallel Luau + BindableEvents to play each tween. I’ve played more than 3 tweens and they all play at the same time, tho.
1 Like
please stop giving incorrect advice
2 Likes
Your tweens will all start and end at the same moment.
Maybe it’s just that it’s not looking well-synced visually? Try changing the tween times and see what effect is closest to what you want to achieve.
2 Likes
2112Jay
(2112Jay)
September 9, 2024, 10:25pm
7
In speed 0.5 and 0.75 will yield different timed tweens.
I can’t think of anything faster than you’re doing.
maybe after a pause
local RunService = game:GetService("RunService")
RunService.Stepped:Wait()
tween1:Play()
tween2:Play()
tween3:Play()
2 Likes
pixe_ated
(venv)
September 9, 2024, 11:08pm
8
the task scheduler already handles tweens per frame
1 Like
system
(system)
Closed
September 23, 2024, 11:09pm
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.