Knife slash animation not playing

Hey everyone!

So, I am making a Murder Mystery game (How original) and I’m currently working on the knife.

However, there are some problems. The knife itself damages, but the animation doesn’t seem to play. I’ve added a print before the animation playing inside my script, but the same results occured.

Some important things to know:

  • The knife is a Free Model, but I only use the Handle and the Tool, and I deleted the rest. The Handle only contains a FileMesh, my script with an Animation Inside it.

  • Before you’ll ask it, I’ll make it clear that both my animation and my game is R6.

  • The script I’m using is a ServerScript. Maybe that’s the problem, but I have no idea.

Here’s my script, if that helps:

local Slashing = false

script.Parent.Parent.Equipped:Connect(function()
	humanoid = script.Parent.Parent.Parent:FindFirstChild("Humanoid")
end)

script.Parent.Parent.Activated:Connect(function()
	Slashing = true
	print("Slashing")
	local slash = humanoid:LoadAnimation(script.Slash1)
	slash:Play()
	wait(1)
	Slashing = false
end)

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		if Slashing then
			hit.Parent:FindFirstChild("Humanoid").Health -= 110
		end
	end
end)

I really hope I can get this working, thanks in advance!

1 Like

Hi, i used the same script as you show and it works fine for me. Maybe the mesh that is inside isnt named Handle? Also make sure your tool has ManualActivationOnly to false and not to true.

I think you need to load the animation to the players animator rather than the humanoid.

Hello!
Did you upload the animation on the same profile/group of the game?
If it’s on the same profile/group, did you put the animation priority to action?
image
Hope that helps!

Hello everyone!

Sorry, I kinda forgot to see these replies (again, sorry about that) but now I’m going to answer your questions!

    1. The Handle (Part) is named Handle, however, the ManualActivationOnly isn’t set to true. I set that to true now. Now it isn’t even damaging.
    1. I’ve did LoadAnimation before, and it worked:
      Check out the tutorial I made
      Nothing happened when I changed it.
    1. I did upload the animation myself, and I’ve put the priority on action.
      still nothing.

I’ve tried everything you said in studio at the moment I’m writing this, but nothing does work.
not even the slashing now. I think I’ll set the ManualActivationOnly to false.

OR WAIT.

I’ve set the manualActivationOnly back to false, and I tried it now. The animation plays!

Looks like it’s important to have an action priority.

Finally, It’s done. Thanks everyone!