Animation Not Playing

I need to animate a sword but the animation is not playing. The following image is the script. I don’t know what to do.
Thanks for your time.

Slash = The Animation in the script that is supposed to be played

Can you please show how you’ve constructed your slash variable?

is the slash a reference to the animation instance or an id?

humanoid:loadanimation() is depecrated, insert an animator and use animator:loadanimation()

It is an animation inside the script with the animation ID already placed

1 Like

It is an animation instance inside the script

I do not understand what you mean by what your saying


local player = game.Players.LocalPlayer
local character = workspace:FindFirstChild(player.Name)
local Humanoid = character:WaitForChild("Humanoid")

and then load the animation.

Also use:

Debounce = false

This is a local script so I cant use LocalPlayer

LocalPlayer is ClientSide (localscript) (you can use it on clientside not serverside (script))

Sorry, I meant it is a server script

Make it as a LocalScript, scripts are making tools to work wrong. (only when using RemoteEvents a serverside script is used)

In the same script the sword deals damage to a player… Would that still work if I convert it into a local script? I need to keep it in the same script because of a debounce

No don’t put anything you want server side such as damage in a local script
you could fire a remotevent from the client to the serverscript to deal damage

Yes, it will work.


Dealing Damage from a LocalScript works for me tho

Add a script inside your handle and script it to deal damage

it only does it client side meaning the person you damaged wont die but they will on your screen just not on theirs lol

Use a script on the handle and add a boolvalue to see if the sword is activated. Easier way

Well then, If your game is owned by a group, that animation’s author should be the group, if the game is owned by you, the author of the animation needs to be you, if the game is owned by one of your friends, you should tell them to publish the animation for you and give you the ID.