Hello. I’m having a really weird and buggy issue with the following script.
if Character:FindFirstChild("Animate") then
print("Found Animator")
for _,AnimationUnit in pairs(Character:FindFirstChild("Animate"):GetChildren()) do
print("Found Animation Child")
if AnimationUnit.Name ~= nil then
print("Wasen't nil.")
if AnimationChanger[AnimationUnit.Name] then
print("Found it in a table")
local WithinAnimation = AnimationUnit:FindFirstChildWhichIsA("Animation")
if WithinAnimation then
print("Setting ID")
WithinAnimation.AnimationId = "rbxassetid://"..AnimationChanger[AnimationUnit.Name]
end
end
end
end
end
In-studio, this script works fine. Like, perfectly. No errors, the animations change, etc.
In-game, it’s a different story. Nothing happens. Like, the print() functions all run no problem, but the animation of the character gets stuck on the exact keyframe it was prior to being changed.
Does anyone know a solution?
For context, this is editing a player’s default animation system under their humanoid.
Do you have correct ownership of the animations you want to set?
1 Like
I uploaded them, so I should have ownership.
Are you getting any printed errors in your F9 console?
No errors. The code appears to run as normal, but the animations don’t work outside of studio.
Is this a group game or a private game under your name?
1 Like
Its a public game, under a group.
Im assuming you uploaded them to your inventory so…
You need to reupload the animations, but change the ownership of the animations to the group the game is published under.
How do I upload an animation under a group?
In the upload screen where you set the name etc, there should be a “Creator” dropdown menu.
1 Like
Sadly this didn’t work. Do you have any other ideas?
This also made the animation no longer work in studio, now it’s replaced with some weird animation where only feet move.
Do you have the correct animation priorities set?
1 Like
Yes, make sure you have these set properly; movement or action would probably be appropriate priorities.
Um, I believe you need to set it before you finalize and publish the animation. You’ll most likely need to re-make the animation.
I’m using Moon Animator. Do you know what setting it is?
Oh, I have no clue. I suggest using the built-in Roblox Animation Creator under Plugins
as it would make it a lot easier to set the animation priority and probably make the script work as expected!
In the animation editor there should be an option where you export the animation to set its priorities.
2 Likes