You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to use the AnimationClipProvider to create temporary animation IDs for my animations. This is so that I can continue working on them without having to republish them, cluttering up my animations folder in my developer assets. -
What is the issue? Include screenshots / videos if possible!
I am using a script (shown below) to iterate through all the animations within RBX_ANIMSAVES and assign each one a temporary AnimationId, before creating an attribute with the animation’s name and Id as its value for any server script to access (all animations will be run on the server). The script uses recursion (the function calling itself) so can be a bit difficult to understand, but I don’t see what’s going wrong. -
What solutions have you tried so far? Searching online and in the DevForum. The documentation for AnimationClipProvider wasn’t very helpful either.
Here’s the script. It’s placed within ServerScriptService. The output tab also doesn’t seem to show anything pertaining to this script.
local AnimSaves = game.ServerStorage:WaitForChild("RBX_ANIMSAVES")
local Provider = game:GetService("AnimationClipProvider")
local function ConvertKeyframes(root)
if root:IsA("KeyframeSequence") then
script:SetAttribute(root.name, Provider:RegisterAnimationClip(root))
else
for _, child in ipairs(root:GetChildren()) do
ConvertKeyframes(child)
end
end
end
ConvertKeyframes(AnimSaves)
If anyone has an idea as to why this isn’t working, please do reply, I have no idea why this could be.
Also, this is the first topic I’ve created on the forums. If I’ve done anything wrong, do please say.