Tool animation not working

A few months ago I couldn’t make animations for my tools. I was annoyed, and made a new account. That new account worked for about 3 or 4 weeks. I don’t want to make a new account because I don’t feel like moving all of my assets again. I dont think its a problem with my script because it was working for a few weeks. I looked at multiple ( I mean like more than 20 ) topics about similar issues. None of these worked. I have no clue what is happening. here is a few things I tried, switching my game and animations to a group, making a new animation, changing animation priority (already action), making new accounts. Nothing seems to be working for what is like a really annoying roblox scripting curse.

Can I see the script you have for this?
What sort of animation is it, as well? e.g. r6, r15 or custom

Set animation priority to action. Make sure the rig type is correct. If so, test it on a dummy rig using a script to play it. It is possible that you anchored your rig and the animation will not appear to play. Make sure you are the owner of the animation (studio playtesting). Make sure the game owner is also the owner of the animation (team test/roblox player/playtesting).

Try testing the animation in an empty baseplate. If it doesn’t work, try deleting the Humanoid and loading the animation from an AnimationController with an Animator inside. Don’t forget to :Play()! Remove all parameters from :Play(), and try again. Recreate your animation for a different rig type if the problem persists. If this still doesn’t work, make sure your LocalScript is running properly. If you are using a Script, you should be fine. If you are using the latest studio update, try installing Roblox Mod manager to downgrade studio (use one in august 2022).


If any of these solved the issue, quote the answer so that other developers can find out what fixed the issue.

1 Like

The script doesn’t really matter because It is always working on other accounts until a few months after, also it is r6

1 Like

The animation priority is action and I am using play and I made multiple animations on different weapons and such

1 Like
local player = game:GetService("Players").LocalPlayer
local mouse = player:GetMouse()
local UID = game:GetService("UserInputService")

local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid",5)

local animator = humanoid:WaitForChild("Animator",5)

local hold = animator:LoadAnimation(script.Parent.RifleAim)
local fire = animator:LoadAnimation(script.Parent.RifleFire)
local reload = animator:LoadAnimation(script.Parent.RifleReload)

equipped = false

script.Parent.Equipped:Connect(function()
	equipped = true
	hold:Play()
end)
script.Parent.Unequipped:Connect(function()
	equipped = false
	hold:Stop()
end)

UID.InputBegan:Connect(function(key,isTyping)
	if isTyping == false then
		if equipped == true then
			if key.KeyCode == Enum.KeyCode.R then
				script.Parent.Ammo.Value = 0
				reload:Play()
				script.Parent.M4_Reload:Play()
				wait(reload.Length)
				script.Parent.Ammo.Value = script.Parent.MaxAmmo.Value
			end
		end
	end
end)

UID.InputBegan:Connect(function(key,isTyping)
	if isTyping == false then
		if equipped == true then
			if key.KeyCode == Enum.KeyCode.F then
				script.Parent.Safety.Value = not script.Parent.Safety.Value
			end
		end
	end
end)

local firing = false

function fireLoop()

	while equipped and firing and script.Parent.Ammo.Value > 0 and script.Parent.Safety.Value == false do
		fire:Play()
		script.Parent.Ammo.Value = script.Parent.Ammo.Value - 1
		script.Parent.RemoteEvent:FireServer(mouse.Hit.p)
		task.wait(.1)
	end
	fire:Stop()
	firing  = false
end

mouse.Button1Down:connect(function()
	if equipped == false then
		return
	end
	local sound = script.Parent["Chinese Assault Rifle Fire"]
	sound:Play()
	sound.Ended:connect(function()
		sound:Destroy()
	end)

	mouse.Button1Up:connect(function()
		firing = false
	end)
	if firing == true then return end
	firing = true
	fireLoop()
end)

local remoteEvent = script.Parent:WaitForChild("RemoteEvent",5)
remoteEvent.OnClientEvent:Connect(function()
	local hitMarker = Instance.new("Sound",script.Parent)
	hitMarker.SoundId = "rbxassetid://160432334"
	hitMarker.Volume = 0.75
	hitMarker:Play()
	hitMarker.Ended:connect(function()
		hitMarker:Destroy()
		return
	end)
end)

1 Like

Nevermind, I figured it out. I didn’t realize th script was disabled

1 Like

Ah, next time I’ll include that in my post if someone has the same issue.