#is it possible to play the anims

1 messages · Page 1 of 1 (latest)

novel berry
#

function sort(tablevar)
    local sorted = {}
    for i, v in pairs(tablevar) do
        table.insert(sorted, i, v)
        v = nil
    end
    tablevar = sorted
end

anims.animations = {}
function anims.init()
    local debounce = true
    for i, animation:Instance in script.Parent.Parent.animations:GetChildren() do
        local keyframes = animation:GetChildren()
        local list = anims.animations
        list[animation.Name] = {}
        list[animation.Name]["keys"] = {}
        list[animation.Name]["keys"]["times"] = {}
        warn("if repeating fix: anims loop")
        for i,keyframe:Keyframe in keyframes do
            local edits = keyframe:GetDescendants()
            keyframe.Name = "keyframe"..i
            list[animation.Name]["keys"][keyframe.Name] = {}
            list[animation.Name]["keys"][keyframe.Name]["cframes"] = {}
            list[animation.Name]["keys"][keyframe.Name]["motors"] = {}
            for i, edit:Pose in edits do
                debounce = false
                if edit.Name == "HumanoidRootPart" then continue end
                local motors = {}
                for i,child in script.Parent.Parent:GetDescendants() do
                    if child:IsA("Motor6D") then
                        motors[child.Name] = child
                    end
                end
                local currentmotor = motors[edit.Name]
                local cframe = edit.CFrame
                table.insert(list[animation.Name]["keys"][keyframe.Name]["cframes"], cframe)
                table.insert(list[animation.Name]["keys"][keyframe.Name]["motors"], currentmotor)
                task.wait()
            end
            table.insert(list[animation.Name]["keys"]["times"], keyframe.Time)
        end
    end
    script.Parent.Parent.animations:ClearAllChildren()
    return anims.animations
end


return anims```
#

im doing this because i need to move other motors whil they be playing

lament narwhal
#

why arent you just playing the animations

novel berry
#

so im doing this'

novel berry
oak prawn
#

animator:LoadAnimation()??

novel berry
quasi archBOT
#

studio** You are now Level 4! **studio

lament narwhal