Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

3 comments

0

Where are you calling the function playShockAnim?

0

what does Source means in function?

0

what should i use instead then?

1 answer

✓ Accepted answer

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.

2 comments

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

0

So, maybe you have something wrong with your animation or bodyparts

This discussion is preserved as it was. New answers, comments, and votes are closed.