How to run an animation differently for the character?

I have a script which is a player scrolling system but the problem is that when the script runs and runs an animation another script makes the animation jump around like crazy instead of doing the animation.
The point is that I want you to give me ideas on how to run an animation without the classic :Play if not in a different way

One way to run an animation without using the :Play() method is to use the :AdjustSpeed() method to adjust the speed of the animation.

Here’s an example code that uses this method:

-- define the animation and the humanoid
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://1234567890" -- replace with the animation ID
local humanoid = script.Parent:WaitForChild("Humanoid")

-- play the animation at a slower speed
humanoid:LoadAnimation(animation)
humanoid:AdjustSpeed(0.5) -- play at half the speed
humanoid:Play()

You can adjust the speed of the animation by passing a number between 0 and 1 as an argument to the :AdjustSpeed() method, where 0.5 would play the animation at half the speed, and 1 would play it at the normal speed.

Another way to run an animation is to use the :Resume() method, which resumes a previously paused animation. Here’s an example:

-- define the animation and the humanoid
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://1234567890" -- replace with the animation ID
local humanoid = script.Parent:WaitForChild("Humanoid")

-- play the animation and pause it immediately
humanoid:LoadAnimation(animation)
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack:Play()
animationTrack:Pause()

-- resume the animation after a delay
wait(1) -- replace with the desired delay
animationTrack:Resume()

This code loads the animation and plays it, but then immediately pauses it. After a delay, the animation is resumed using the :Resume() method. This method can be useful if you need to delay the start of an animation or if you need to pause and resume an animation multiple times.

You should see my other topic, please, I’m telling you that I changed my mind, well, to see if you can help me

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.