Log in to vote

Why Won't the Animation Play Smoothly?

Asked by 17 days ago
Edited 17 days ago

Hello, So basically I made an animation for a bus model and I made this local script that makes the bus animation play for you when you enter a game:

    local bus = game.Workspace:WaitForChild("SchoolBusAnim")
    local animationController = bus:FindFirstChild("AnimationController")

    if animationController then
        local animator = animationController:FindFirstChild("Animator") or"Animator",animationController)
        local animations = {}
        local busGoesOff = animationController:FindFirstChild("BusGoesOff")

        if busGoesOff then
            animations.BusGoesOff = animator:LoadAnimation(busGoesOff)
            print("Animation BusGoesOff not found")
        print("AnimationController not found")

This script works well but when I test the game the animation is so laggy, it's like 10 fps, although I made the animation in 100 fps. One time when I was testing, I opened the output and the and the size of the game's viewport got smaller, and when it did the animation would play smoothly, but once I close it, it's just really laggy. I really don't understand. Is it because of the script, is it a studio bug, or is it the animation. Thank you very much if you help me.

Answer this question