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

Why wont this animation play?

Asked by
Chronomad 180
9 years ago

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 R2 = Instance.new("Animation")
11    R2.AnimationId = "rbxassetid://319228239"
12    --local I2 = Instance.new("Animation")
13    --I2.AnimationId = "rbxassetid://319228239"
14 
15 
View all 45 lines...
0
what type of scirpt is it in koolkid8099 705 — 9y

1 answer

Log in to vote
2
Answered by
Decemus 141
9 years ago

Ah, just a small mistake. The elseifcode is running under the wrong if statement. Simply fix this by adding an end before the elseif of Stance.Value == ("Right")

1
He's right. dirty_catheter 7 — 9y
0
Wooh! Thanks alot c: Chronomad 180 — 9y
Ad

Answer this question