How to make animations not cursed

Hey there! Ive recently got a little into animating, and Im currently trying to make a module script where pressing “e” plays an animation, though when testing, the animation does play. However, if I were to do things like jump and then do the animation, my arms go flying in the animation and the script doesn’t play, and when walking and dashing, because I’m walking, one of my arms in the animation is a little further than the other because of the walking animation. My computer is really bad so unfortunately I’m not able to provide a video, but I can provide the animation bit of the code.

local uis = game:GetService("UserInputService")
local anim ="Animation")

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local dashTable = {}

local anim ="Animation")
anim.AnimationId = module.dashAnim
local animTrack = animator:LoadAnimation(anim)
animTrack.Priority = Enum.AnimationPriority.Action

module.dash = function(plr)

Any help would be greatly appreciated!

1 Like

This problem occurred because you’re playing multiple animations at the same time because every player spawns with a “Animate” script in the player’s character.
That script includes all the animations like: The walking animation, running animation, jumping animation, etc. You can try disabling the “Animate” script when playing the animation but I am not sure if this would work.
I hope this helped. :happy1:

Edit: If you disable the “Animate” script while it is running an animation (for example: Idle, Jumping, Walking, etc.) it will get stuck in a loop until you enable the “Animate” script. So I would stop the player from jumping/moving and maybe delete the idle animation. (not required)

so if i want to do that, how exactly would I do that? sorry, I’m not very good at this lol!

If you want to bring the Animate script into the explorer then you have to enter the game, open the explorer, open your character and copy the Animate script and paste it in StarterCharacterScripts from there you can delete some code or maybe disable it with the LocalScript like this:

-- Your code
local Player = game.Players.LocalPlayer -- Gets the local player
local Character = Player.Character -- Gets the player's character
local AnimateScript = Character:FindFirstChildOfClass("LocalScript") and Character:FindFirstChild(
"Animate") -- Gets the Animate script  (extra secure because why not?)
-- Do whatever you want with this code

Oh and if you want to stop the player from moving/jumping you can try:

local Player = game.Players.LocalPlayer -- Gets the local player
local Character = Player.Character -- Gets the player's character
local Humanoid = Character:FindFirstChild("Humanoid") -- Gets the humanoid of the player's character
Humanoid.CharacterUseJumpPower = true -- Uses JumpPower (50 default) instead of JumpHeight (7.2 default)
local PreviousSpeed = Humanoid.WalkSpeed -- Self-explanatory
local PreviousJump = Humanoid.JumpPower -- Self-explanatory
Humanoid.WalkSpeed = 0 -- Sets the player's speed to 0 (stops the player from moving in any direction)
Humanoid.JumpPower = 0 -- Sets the player's jump power to 0 (stops the player from jumping)
wait(x) -- Set this to the length of the animation. (or longer)
Humanoid.WalkSpeed = PreviousSpeed -- Sets the player's speed to the previous walk speed
Humanoid.JumpPower = PreviousJump -- Sets the player's jump power to the previous jump power

If you need more help then message me or reply to this messsage please. :slight_smile:
I hope this helps. :woozy_face:

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