Learn
Engine Class
KeyframeSequenceProvider
Deprecated
Not Creatable
Service
Not Replicated

Summary
Methods
GetAnimations(userId: User):Instance
Deprecated
GetKeyframeSequence(assetId: ContentId):Instance
Deprecated
GetKeyframeSequenceById(assetId: number,useCache: boolean):Instance
Deprecated
RegisterActiveKeyframeSequence(keyframeSequence: Instance):ContentId
RegisterKeyframeSequence(keyframeSequence: Instance):ContentId
Inherited Members
Code Samples
Create temporary animation
local KeyframeSequenceProvider = game:GetService("KeyframeSequenceProvider")
local function createPreviewAnimation(keyframeSequence)
local hashId = KeyframeSequenceProvider:RegisterKeyframeSequence(keyframeSequence)
local Animation = Instance.new("Animation")
Animation.AnimationId = hashId
return Animation
end
local keyframeSequence = Instance.new("KeyframeSequence")
local animation = createPreviewAnimation(keyframeSequence)
print(animation)

API Reference
Methods
GetAnimations
Deprecated

GetAnimationsAsync
Yields
Capabilities: Animation
KeyframeSequenceProvider:GetAnimationsAsync(userId:User):Instance
Parameters
userId:User
Returns
Code Samples
KeyframeSequenceProvider GetAnimationsAsync
local KeyframeSequenceProvider = game:GetService("KeyframeSequenceProvider")
local USER_ID = 0 -- Insert your UserId here
local function extractPages(pagesObject)
local array = {}
while true do
local thisPage = pagesObject:GetCurrentPage()
for _, v in pairs(thisPage) do
table.insert(array, v)
end
if pagesObject.IsFinished then
break
end
pagesObject:AdvanceToNextPageAsync()
end
return array
end
local inventoryPages = KeyframeSequenceProvider:GetAnimationsAsync(USER_ID)
local animationIds = extractPages(inventoryPages)
for _, id in pairs(animationIds) do
print(id)
end
print("total: ", #animationIds)

GetKeyframeSequence
Deprecated

GetKeyframeSequenceAsync
Yields
Capabilities: Animation
KeyframeSequenceProvider:GetKeyframeSequenceAsync(assetId:ContentId):Instance
Parameters
assetId:ContentId
Returns
Code Samples
Getting an animation's KeyframeSequence
local KeyframeSequenceProvider = game:GetService("KeyframeSequenceProvider")
local ANIMATION_ID = "rbxassetid://507771019"
-- Get the keyframe sequence for the asset
local keyframeSequence
local success, err = pcall(function()
keyframeSequence = KeyframeSequenceProvider:GetKeyframeSequenceAsync(ANIMATION_ID)
end)
if success then
-- Iterate over each keyframe and print its time value
local keyframeTable = keyframeSequence:GetKeyframes()
for key, value in keyframeTable do
print(`The time of keyframe number {key} is: {value.Time}`)
end
else
print(`Error getting KeyframeSequence: {err}`)
end

GetKeyframeSequenceById
Deprecated

RegisterActiveKeyframeSequence
Capabilities: Animation
KeyframeSequenceProvider:RegisterActiveKeyframeSequence(keyframeSequence:Instance):ContentId
Parameters
keyframeSequence:Instance
Returns
ContentId
Code Samples
Create temporary animation
local KeyframeSequenceProvider = game:GetService("KeyframeSequenceProvider")
local function createPreviewAnimation(keyframeSequence)
local hashId = KeyframeSequenceProvider:RegisterKeyframeSequence(keyframeSequence)
local Animation = Instance.new("Animation")
Animation.AnimationId = hashId
return Animation
end
local keyframeSequence = Instance.new("KeyframeSequence")
local animation = createPreviewAnimation(keyframeSequence)
print(animation)

RegisterKeyframeSequence
Capabilities: Animation
KeyframeSequenceProvider:RegisterKeyframeSequence(keyframeSequence:Instance):ContentId
Parameters
keyframeSequence:Instance
Returns
ContentId
Code Samples
KeyframeSequenceProvider:RegisterKeyframeSequence
local KeyframeSequenceProvider = game:GetService("KeyframeSequenceProvider")
local asset = KeyframeSequenceProvider:RegisterKeyframeSequence(workspace.KeyframeSequence)
local animation = Instance.new("Animation")
animation.Name = "TestAnimation"
animation.AnimationId = asset
animation.Parent = workspace

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.