Animation does not move anything except for the left arm

What happens: image
What I animated:


My script:

local tool = script.Parent
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local fireEvent = tool:WaitForChild("FireEvent")
local reloadEvent = tool:WaitForChild("ReloadEvent")
local equipped = false
local userInputService = game:GetService("UserInputService")
local db = false
local humanoid
local idle

tool.Activated:Connect(function()
	if db == false then
		local mousePosition = mouse.Hit.Position
		fireEvent:FireServer(mousePosition)
		db = true
		wait(.5)
		db = false
	end
end)

tool.Equipped:Connect(function()
	equipped = true
	humanoid = tool.Parent:FindFirstChild("Humanoid")
	idle = humanoid:LoadAnimation(script.Parent.Idle)
	idle.Looped = true
	idle:Play()
end)

tool.Unequipped:Connect(function()
	equipped = false
	idle:Stop()
end)

Why is this happening? I have no errors.

2 Likes

Try changing the animation’s type to either Idle, Movement, Action1, Action2, or Action3

4 Likes

image
None of them work.

2 Likes

Could you put a print statement in the equipped section and let me know if it prints

If it doesn’t print it could mean your script halts at a certain point (Could be waiting for something Indef)

3 Likes

Hi!!

Seemingly, you’ve done a few slight errors You must change the AnimationPriority to anything other than Core in the animations menu, and publish it again, and don’t fonrget to change the AnimationId in your script according to the new animation.

I think this is also caused by the default tool animations overwriting your custom animations.

And that’s where the complicated part begins.

  • While in game, open the Explorer tab and get inside your character.

  • Copy the script called Animate

  • Leave the game and place it in StarterCharacterScripts.

  • Scroll until you find this line:

function animateTool()
	
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

Change it like this:

function animateTool()
	
	if (toolAnim == "None") then
	--	playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
		return
	end

	if (toolAnim == "Slash") then
	--	playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end

	if (toolAnim == "Lunge") then
	--	playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
		return
	end
end

Hope this helps, if it does, you’re welcome.

3 Likes

The default tool animation is overriding it, change the animation priorities

3 Likes

It does print when it is equipped and unequipped, the animation plays and stops it just doesn’t play correctly

2 Likes

I changed the code of the Animate script and put it in the StarterCharacterScripts.
https://gyazo.com/75d8f77a45b57f0d92561138a4541fb5
That is what I see.
The issue is, ALL OF MY LIMBS move when I move as if it’s the default walking animation.
My entire body is angled now though which I guess is progress.

2 Likes

My mistake. Don’t delete the idle animation, I guess.

2 Likes

So I ended up just changing the animations from Action 3 to Action 4 and it seemed to work, but all of my gunshots come from the bottom of the gun, so I’m assuming I have to work on making the animations replicated to the server now.

2 Likes

Exactly. Hope it works! It may also be about where you create the bullet. Tinker with the value until you’re satisfied! Bye!

2 Likes

Umm, isn’t my solution a bit more explaining than his?

2 Likes

Sorry, his had more brevity and was the only thing I saw mentioning it.

1 Like

Hmm, alright. Thanks anyways. Have a nice one.

3 Likes

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