Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Animation does not play when I have a weapon in hand?

Asked by
emite1000 335 Moderation Voter
9 years ago

I have an animation called "Anime" that moves the player's Right Arm. When I play the animation, it works fine. However, when I play it when a sword is equipped in the player's right hand, the animation does not play. No output or anything.

script.Parent.MouseButton1Click:connect(function()
    Anime = script.Parent.Anime
    Anim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anime)
    Anim:Play()
end)

This is inside a GUI button inside a sword.

I'm totally baffled.

0
How do you have a sword in your left hand? Perci1 4988 — 9y
0
*right emite1000 335 — 9y
0
I think the problem is most likely that the Sword plays an Animation when you are holding it, and I don't think you can play two Animations at once. SlickPwner 534 — 9y
0
The sword I am using is just a Tool with a sword mesh as the Handle. It has none of the original scripts in it that let you click to attack. emite1000 335 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

I think it has to deal with Lines 3 & 4.

script.Parent.MouseButton1Click:connect(function()
Anime = script.Parent.Anime
Anim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anime) --Anim?
Anim:Play() --Anim?
end)

0
I'm not sure what you are pointing out. Anim is defined at line 3, and it is played at line 4. emite1000 335 — 9y
Ad

Answer this question