-
What do you want to achieve?
Creating A Sword Combat System -
What is the issue? Include screenshots / videos if possible!
The issue with it is that it seems to be working like there’s no error what so ever in the output but the animations will not load whenever I’m trying to attack nothing happens but when I get close to the dummy it does damage the only thing that works in the system is the damage but I need the animations to load as well. I even own the animation and checked multiple times if the humanoid and animation are valid which they are. -
What solutions have you tried so far?
I’ve tried countless solutions from replacing the animation ids for the same animation which didn’t work but I owned all of them, I asked countless programmers in Hidden Developers, I’ve indented, capitalized, I’ve turned off can collide, I’ve done everything possible and it still won’t work.
Code:
local tool = script.Parent
local cooldown = script.Cooldown.Value
local animation = script.Swing
tool.Activated:Connect(function()
local humanoid = tool.Parent:FindFirstChildWhichIsA('Humanoid')
if humanoid and cooldown == false then
cooldown = true
local playanim = humanoid:LoadAnimation(animation)
playanim:Play()
tool.Handle.Damage.Disabled = false
wait(0.25)
tool.Handle.Damage.Disabled = true
wait(0.5)
cooldown = false
end
end)