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

Upload custom KeyframeSequences as Animation Assets?

Asked by
duckwit 1404 Moderation Voter
8 years ago

In previous projects, I've used mathematical parametrisation of welds to achieve vivid client-side animations. This technique is processing intensive and cannot be replicated to other players well with filtering enabled.

The ROBLOX Animation Editor plugin functionality is insufficient - it doesn't provide enough flexibility and is cumbersome to work with.

I want to transform my dynamic CFrame animations into Animation Instance approximations by sampling their poses at regular intervals (key frames). The generation of such data is straightforward and not what I'm concerned with here.

Here's a quite informal Wiki article about KeyframeSequence animations.

Here's a quote from that article:

"Why does it have to be uploaded as an asset? Well, there's one definite reason: So that users can't make their own animations. "

The article seems old, and I hope that the restrictions may have changed by now.

Has anyone discovered a way to upload your own KeyframeSequences as animation assets?

1 answer

Log in to vote
0
Answered by
duckwit 1404 Moderation Voter
8 years ago

After further investigation, I can answer my own question.

One can generate KeyframeSequence instances by following the original article.

Such sequences can be used in two ways:

Upload to ROBLOX as an Animation Asset

Select the KeyframeSequence in the game hierarchy. Right click and select "Save Selection to ROBLOX".

Use Animations without Uploading

Alternatively, you can use the animation without uploading it to ROBLOX. To use your KeyframeSequence in an Animation instance, simply generate a new Animation and generate an id value for the AnimationId property like-so:

ksp = game.GetService'KeyframeSequenceProvider'
newId = ksp:RegisterKeyframeSequence(yourSequence)
yourAnimation.AnimationId = newId
Ad

Answer this question