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

How do I make an R15 animation play, and loop?

Asked by 5 years ago

So I recently decided to change my game to R15 and I made a pretty good animation to go with one of the new NPCs but I can't seem to play any kind of animation. I've tried on multiple rigs, anchored and not anchored and to know avail. I'll include the script I've been using.

local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local animation = hum:LoadAnimation(script.Animation)

if char -= nil then
 animation:Play()
end?

Also if I was to fix it, how would I loop a 3-4 second animation with that same script?

0
In lua not equals is ~=, not -= Rheines 661 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You can loop it by setting the loop of the animation to true.

local char = script.Parent
local hum = char:WaitForChild("Humanoid")
local animation = hum:LoadAnimation(script.Animation)

animation.Looped = true

if char -= nil then
 animation:Play()
end?

i havent tested this, but it seems like everybody does this.

0
Ok, but the script itself doesn't seem to work. Thanks for telling me how to loop though, but it's not helpful unless I can figure out why the script is broken. ExpIorian 0 — 5y
0
Whats so broken? jdm4llfem8 94 — 5y
Ad

Answer this question