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

Why Does The Bus Animation Only Play Smoothly In A Script And Not A Local Script?

Asked by 1 year ago
Edited 1 year ago

Hey, I made this local script that is now inside replicated first. This script is supposed to make a bus animation play. This script works just fine, but the animation is so laggy and it's just horrible. However, when I put this code inside a regular script, the animation plays really smoothly. I don't understand why? If you need more details, ask me. Thank you.

local bus = game.Workspace.SchoolBusAnim
local Animator = bus.AnimationController:FindFirstChildWhichIsA("Animator") or Instance.new("Animator",bus.AnimationController)

local Animations = {}

do
    local BusGoesOff = bus.AnimationController.BusGoesOff

    repeat

    Animations.BusGoesOff = Animator:LoadAnimation(BusGoesOff)

           wait()

        until Animations.BusGoesOff and Animations.BusGoesOff.Length > 0

    end

Animations.BusGoesOff:Play()

Answer this question