This script should be playing an animation based on whether Stance.Value = right or left. It plays the cooresponding animation for 'left' but not for right. It's strange. Any help is appreciated.
01 | --Player Values |
02 | local move_left = false |
03 | local move_right = false |
04 | local already_ran = false |
05 | local grounded = false |
06 | local idleAnimation = Instance.new( "Animation" ) |
07 | idleAnimation.AnimationId = "rbxassetid://317651678" |
08 | local runningAnimation = Instance.new( "Animation" ) |
09 | runningAnimation.AnimationId = "rbxassetid://319211805" |
10 | local R 2 = Instance.new( "Animation" ) |
11 | R 2. AnimationId = "rbxassetid://319228239" |
12 | --local I2 = Instance.new("Animation") |
13 | --I2.AnimationId = "rbxassetid://319228239" |
14 |
15 |
Ah, just a small mistake. The elseif
code is running under the wrong if
statement. Simply fix this by adding an end
before the elseif
of Stance.Value == ("Right")