So i made a lightsaber and a animation for a attack. I have everything set like the Value, script, local script, and the weld script. I put the animation into my local script. This is my what my local script says.
local CanAttack = true
script.Parent.Activated:connect(function() local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack)
if CanAttack == true then attack:Play() CanAttack = false wait(1) attack:Stop() CanAttack = true script.Parent.CanDamage.Value = true end end)
So when i go to test it everything works but theirs this one problem. The animation will play when i click with the lightsaber but the lightsaber wont move with it, it just stays in its normal position while the other side of my person is moving. I am also using R15 and the animation is R15. So please help.
I think it has to go something along the lines of this:
local animation = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) animation:Play()