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!
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.
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?
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.