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

I created a animation for a custom model but it just flew away?

Asked by 5 years ago
Edited 5 years ago
01local animation = Instance.new("Animation")
02animation.AnimationId = "https://web.roblox.com/catalog/4760001635"
03-- Local variables
04local animTrack = nil
05local canPlay = true
06 
07function playShockAnim(Source)
08    if canPlay then
09        canPlay = false
10        animTrack = script.Parent.Humanoid:LoadAnimation(animation) -- Load animation into Humanoid
11        canPlay = true
12        animTrack:Play() -- Start the animation
13    end
14end

https://gyazo.com/87e99c72daa2891625a0653ad0b2c918 (this is the link to what happens)

how do I play my animation?

0
Where are you calling the function playShockAnim? killerbrenden 1537 — 5y
0
what does Source means in function? GravityGouse99938 75 — 5y
0
what should i use instead then? User#30123 0 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Okay, you are not calling your function somewhere, just try to do

1playShockAnim()

And also, you have not welded some bodyparts, so they just falling down.

0
I welded all of the parts together but it wouldn't work and i don't get what to do with the script provided User#30123 0 — 5y
0
So, maybe you have something wrong with your animation or bodyparts GravityGouse99938 75 — 5y
Ad

Answer this question