I created a custom sword and sword script and it works. But when the custom animation runs his right arm doesnt follow the animation.
So you know how if you have a non animated tool and your arm just sticks out at a 90 degree angle. Thats what the players arm is doing but the rest of the body is animated. I know this probably isnt the site for this sorta question but I figured it could have to do with the script so I decided to ask it here. I want the tool to be equipped and his right arm to still play the animation. Ive seen it done before on other games so It must be possible.
local CanAttack = true
local player = game.Players.LocalPlayer
script.Parent.Equipped:connect(function()
local character = player.Character
local animateScript = character.Animate
animateScript.idle.Animation1.AnimationId = 'http://www.roblox.com/asset/?id=1083822467' -- This is the animation that I am testing
local attack1 = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack1)
local attack2 = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack2)
local attack3 = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack3)
end)
script.Parent.Activated:connect(function()
local attack1 = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack1)
local attack2 = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack2)
local attack3 = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack3)
if CanAttack == true then
local animationchoice = math.random(1,3)
if animationchoice == 1 then
attack1:Play()
CanAttack = false
wait(1) -- Wait however many seconds long the attack animation is
attack1:Stop()
CanAttack = true
script.Parent.CanDamage.Value = true
end
if animationchoice == 2 then
attack2:Play()
CanAttack = false
wait(1) -- Wait however many seconds long the attack animation is
attack2:Stop()
CanAttack = true
script.Parent.CanDamage.Value = true
end
if animationchoice == 3 then
attack3:Play()
CanAttack = false
wait(1) -- Wait however many seconds long the attack animation is
attack3:Stop()
CanAttack = true
script.Parent.CanDamage.Value = true
end
end
end)

1 comment
its not in the animation script, its in the sword script.