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 4 years ago
Edited 4 years ago
local animation = Instance.new("Animation")
animation.AnimationId = "https://web.roblox.com/catalog/4760001635"
-- Local variables
local animTrack = nil
local canPlay = true

function playShockAnim(Source)
    if canPlay then
        canPlay = false
        animTrack = script.Parent.Humanoid:LoadAnimation(animation) -- Load animation into Humanoid
        canPlay = true
        animTrack:Play() -- Start the animation
    end
end

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 — 4y
0
what does Source means in function? GravityGouse99938 75 — 4y
0
what should i use instead then? Robotcake8 4 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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

playShockAnim()

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 Robotcake8 4 — 4y
0
So, maybe you have something wrong with your animation or bodyparts GravityGouse99938 75 — 4y
Ad

Answer this question