I'm making a prototype sword for my game and i just wanna make sure things are gonna work. I have made animations before and use them successfully but now I'm having trouble. I equip my sword, i click and the script runs smoothly except for one thing, the animation doesn't play. This is all in a local script and i do load my animation into the humanoid.
local tool = script.Parent
local debounce = true
tool.Activated:connect(function()
if debounce then
debounce = false
local animation = script.attack
animation.AnimationId = "http://www.roblox.com/Asset?ID=897730969"
local char = game.Players.LocalPlayer.Character
local newAnimation = char.Humanoid:LoadAnimation(animation)
newAnimation:Play()
local killBrick = script.Parent.Damage
local kill = killBrick.Touched:connect(function(ply)
if ply.Parent:FindFirstChild("Humanoid") then
local humanoid = ply.Parent:FindFirstChild("Humanoid")
humanoid:TakeDamage(30)
end
end)
wait(2)
kill:Disconnect()
debounce = true
end
end)
Is annoying because i don't even know why

1 comment
well they do, but maybe your problem was involving the animation being owned by a group