Animation Script

Hi,

I have 3 tools, but this plays the same animation over and over when they’re all different, much appreciated if you help

local Tool = script.Parent
local Animation = Tool.Animation

Tool.Activated:Connect(function()
	local Character = Tool.Parent
	local Humanoid = Character.Humanoid

	local AnimationTrack = Humanoid:LoadAnimation(Animation)
	AnimationTrack:Play()
end)

This is likely because your animation is a loop. You need to stop the animation so it doesnt overlap with the others.

try adding

Animation.Looped = false

tried that but still does it rip

Mb, I mean
AnimationTrack.Looped = false
^ add this below the animation track variable

still doesnt work thanks for trying though

are there any errors on the output?

nope no errors on the output

**

Then I’m pretty sure this is the issue.
Basically, when you equip a tool I’m pretty sure the built in “Equip” animation plays and loops. You know how if you equip a tool, the orientation of your arm changes? I’m not sure how you can remove that, but that’s basically the problem. The build in animation overlaps your custom animations(I think)

Although its most likely not the issue, do not load animation on humanoid, its deprecated. instead do

local Animator = Character.Humanoid.Animator

local AnimationTrack = Animator:LoadAnimation(Animation)
AnimationTrack:Play()

doesnt work console says aattempt to index nil with Humanoid

That means the character does not exist.

oh uh how do i make it exist then

it means character is nil so you are doing nil.Humanoid so its giving you an error. idk why its nil.