Animation not running properly

I’ve been trying to play an animation when someone presses G on their keyboard and for some reason, the arms are only going halfway up.

I tried testing the exact same thing but only with the animation and it still did not work.

LocalScript (in StarterCharacterScripts):

local UIS = game:GetService("UserInputService")
local char = script.Parent
local player = game.Players.LocalPlayer

local notUse = false

local Anim = Instance.new("Animation")
Anim.AnimationId = "rbxassetid://9100940156"
local fireAnim = char.Humanoid:LoadAnimation(Anim)

local handR = char.RightHand
local handL = char.LeftHand

local keybind = Enum.KeyCode.G

-- Right Arm's Flame --

flameR = Instance.new("ParticleEmitter")
flameR.Parent = handR
flameR.Enabled = false
flameR.Transparency = NumberSequence.new(0)
flameR.Color = ColorSequence.new(Color3.new(255, 255, 255))
flameR.Size = NumberSequence.new(1.5)
flameR.LightInfluence = 1
flameR.Texture = "rbxassetid://160041569"
flameR.Lifetime	 = NumberRange.new(1.25, 1.75)
flameR.Rate = 75
flameR.Speed = NumberRange.new(7.5)
flameR.EmissionDirection = ("Front")
flameR.SpreadAngle = Vector2.new(15, 15)

-- Left Arm's Flame --

flameL = Instance.new("ParticleEmitter")
flameL.Parent = handL
flameL.Enabled = false
flameL.Transparency = NumberSequence.new(0)
flameL.Color = ColorSequence.new(Color3.new(255, 255, 255))
flameL.Size = NumberSequence.new(1.5)
flameL.LightInfluence = 1
flameL.Texture = "rbxassetid://160041569"
flameL.Lifetime	 = NumberRange.new(1.25, 1.75)
flameL.Rate = 75
flameL.Speed = NumberRange.new(7.5)
flameL.EmissionDirection = ("Front")
flameL.SpreadAngle = Vector2.new(15, 15)

-- Flame Sound --

flameSound = Instance.new("Sound")
flameSound.Parent = char.UpperTorso
flameSound.SoundId = "rbxassetid://346067083"


UIS.InputBegan:Connect(function(input,gameprocessed)
	if gameprocessed then return end
	
	if input.KeyCode == keybind then
		if not notUse then
			
		notUse = true
		print(player.Name .. "'s Fire Ability Cooldown Started.")	
			
		char.Humanoid.WalkSpeed = 0
		char.Humanoid.JumpPower = 0
		flameR.Enabled = true
		flameL.Enabled = true
		fireAnim:Play()
		flameSound:Play()
		
		wait(3)

		char.Humanoid.WalkSpeed = 16
		char.Humanoid.JumpPower = 50
		flameR.Enabled = false
		flameL.Enabled = false
		fireAnim:Stop()
		flameSound:Stop()
			
		wait(5)
			
		notUse = false
		print(player.Name .. "'s Fire Ability Cooldown Ended.")	
		 
	end
  end
end)

How the animation plays (in-game):

How it should play (in animation editor):

It’s almost as if the legs are fully playing but the arms are only going halfway.

4 Likes

Try To Parent The Animation To The Humanoid

2 Likes

Did you make handR and handL massless? That might be the reason why it won’t go all the way up, though I doubt that.

Also keep in mind that the particles you made can only be seen by you and not anyone else. You should create the effects on the server and fire a remote event whenever you want to enable them.

2 Likes

Just tried it, it didn’t work.

Even with them massless it still didn’t work.

And yes I realize that, I’m just testing it for now.

Is anything affecting the animation weight of the arms? Animation weight can decrease the elevation of the arms if there’s already another animation playing, so it plays an animation that is in the middle of both.

1 Like

Try changing the animation up to make the arms go even higher. If the arms do go higher when you test it in-game it would mean that it’s some kind of animation bug. There’s really nothing wrong with your code that would make your arms not go up as they should.

Edit: Also like @SKURMIEE said, it could indeed have to do with Animation weight. Try setting the priority to Action.

Yes, what I’m saying. The animation bug could be caused by another animation with more weight. Is there, Clout?

I’m gonna see how Roblox plays their animations and try something like that.

And yes I think you’re both right on the weight part.

Most of roblox default animations have their priority set below “Movement”, don’t remember exactly what the priority is but setting yours to “Attack” and then reuploading it should do the job!

1 Like

There are apparently multiple Action animation spots now, so there’s more than 1 action type. You can set it to any of them, since they all have more priority than Core, Idle, and Movement.

image

1 Like

This worked! Thank you! I’ve had this problem for a couple of days and was too lazy to ask.

(Also thank you as well @SKURMIEE)

1 Like

Hi, easy fix (it was for me).
You just go into the animation editor, and set the animationpriority to “Action”, then publish the animation.
image

1 Like

Yeah, we ended up figuring out that was the problem a couple of minutes ago, thanks anyway!

1 Like