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

Animations that I uploaded not working?

Asked by 7 years ago
Edited 7 years ago

The animations that I uploaded all worked on my game. I then forwarded that game over to a group game, and the animations that I uploaded no longer work. Though, the animations that I use for the menu uploaded by roblox still work. Any suggestions?

(Both games were Filtering Disabled)

All animations use the same code, though ones only uploaded by ROBLOX work.

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID=517348029"

local trackanimation = nil
local playability = true
function playAnimation(AnimationSource)
if playability == true then
    local plr = game.Players.LocalPlayer
    trackanimation = plr.Character.Humanoid:LoadAnimation(animation)
    trackanimation.KeyframeReached:connect(function(kf)
    print('Working')    
    end)
    trackanimation:Play()
end 
end
script.Parent.MouseButton1Click:connect(playAnimation)

UPDATE: I checked logs and I receive this error:

Animation "http://www.roblox.com/asset/?id=733806517&serverplaceid=739017660" failed to load in "Animation.AnimationId":Animation failed to load

1 answer

Log in to vote
0
Answered by 7 years ago

try this to play the animation.

        local Anim = script:WaitForChild("Animation")
        local s = player.Character.Humanoid:LoadAnimation(Anim)
        s:Play()

and put the animation inside the script and name it "Animation" and make sure you EXPORTED the animation!

0
you can add clicks and such onto it, this script basically injects the animation from the script into the humanoid then plays it. Shadowthaumaturge 97 — 7y
0
I did, it was uploaded to the site and all EliteJcoombs 77 — 7y
0
Also, the other game has the animations as play-able, is it a configuration error? EliteJcoombs 77 — 7y
0
strange, try getting an animation track and placing it inside server storage with you animation id, sometimes this stuff happens- this usually happens for my decals though, I've never seen a "playable" function before Shadowthaumaturge 97 — 7y
View all comments (12 more)
0
Will try EliteJcoombs 77 — 7y
0
getting an issue with local Anim = game.ServerStorage:WaitForChild("Animation"), it is having trouble find Animation, even though it is visibly there. EliteJcoombs 77 — 7y
0
Really strange, I use that script for my animations and they work- did you put the animation inside of the script? Shadowthaumaturge 97 — 7y
0
No, I put it in ServerStorage. EliteJcoombs 77 — 7y
0
I defined it in ServerStorage though. EliteJcoombs 77 — 7y
0
Okay, I tried your way by putting it in the script, and it brought me all the way back to an animation loading error. EliteJcoombs 77 — 7y
0
do you have the full script? Something is definitely wrong with the animation being exported. Shadowthaumaturge 97 — 7y
0
local Anim = script:WaitForChild("Animation") local player = game.Players.LocalPlayer function playAnimation(AnimationSource) local s = player.Character.Humanoid:LoadAnimation(Anim) s:Play() end script.Parent.MouseButton1Click:connect(playAnimation) EliteJcoombs 77 — 7y
0
using that script you should have the animation inside of the script Shadowthaumaturge 97 — 7y
0
Yep, I did. Gave me the error that I got with my original script. I checked my game config, and it's the same as the other game that works with the animations. EliteJcoombs 77 — 7y
0
Since this is a really weird bug and you provided me with a working, more simplified script, I'll accept your answer. EliteJcoombs 77 — 7y
0
Sorry man :/ Thanks for the accept! Shadowthaumaturge 97 — 7y
Ad

Answer this question