Sword slashing animation and damage not working

Iā€™m trying to make a sword that do damage on a npc and also having a slash animation but when I try to make it not seem to run the animation or damage the player when I run this basic script how can I fix this?
Script:

3 Likes

Okay, 2 things

  1. Make sure the animation priority is set to movement and make sure you are defining the animation correctly (check roblox docs for good examples)

  2. Dont use the mouse to make the sword swing use:

tool.Activated:Connect(function(hit)

Hope this helps

3 Likes

Hmm, why is take damage empty? It should not be, inside the function, put the amount of damage you want like ā€œ10ā€ or ā€œ5ā€ I like to putting 10 as it is a medium value of damage.

3 Likes

Right you are! I should have mentioned that aswell

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.