Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

animations aren't working when I activate tool??

local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local hum = char:WaitForChild("Humanoid")
local mouse = plr:GetMouse()
local tool = script.Parent
local canattack = true
local choose = 1

tool.Activated:connect(function()
	if choose == 1 and canattack == true then
		choose = 2
		canattack = false
		local anim = hum:LoadAnimation(script.Punch1)
		anim:Play()
		wait(.5)
		canattack = true
	elseif choose == 2 and canattack == true then
		choose = 1
		canattack = false
		local anim = hum:LoadAnimation(script.Punch2)
		anim:Play()
		wait(.5)
		canattack = true
	end
end)

whenever I click with the tool equipped the animations don't play. The system says there r no errors and the animation priorities are both action and non looped.

1 answer

Make sure that when you created the animation, you set its priority to Action.

1 comment

0

I did

This discussion is preserved as it was. New answers, comments, and votes are closed.