I’ve tried server and local scripts but it won’t play. Here is the server script currently
local tool = script.Parent
local animtaion = script.Parent:WaitForChild("Swipe")
tool.Activated:Connect(function()
local Animation = script.Parent.Parent.Humanoid.Animator:LoadAnimation(animtaion)
Animation:Play()
end)
I haven’t developed for a while so I am a little rusty so I may have missed something obvious, all help appreicated.
Doesn’t change anything. For a tool to be activated, it needs to be equipped. When a tool is equipped, it’s parent is the character, and not the backpack. Therefore, the character will be script.Parent.Parent, or more simply, tool.Parent.
It’s hard to determine on what line the error occours.
Do this:
Don’t load the animation every time you want to play it; load it only once!
Check if the Animator actually exists when the tool is activated (you may actually want to declare a variable containing it beforehand)
^ It should probably be there though. Are you using a custom character without it?
check if the animation was uploaded correctly (e.g. if it’s a group game, it should be uploaded to the group)
By the way, you misspelled the variable “animation” as “animtaion”.
you should actually check if the animation is actually made under your name and not under your group
check if the animation is actually inside the tool
check if the tool is actually being activated
if you dont have a handle make sure require handle is off