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

why do i keep getting these errors?

Asked by 8 years ago

I am trying to create a new animation every time i press q and i keep getting these errors. and YES, i have tried launching the actual server, I am yes indeedy logged into my roblox account so it's none of those problems.

02:36:03.237 - httpGet http://assetgame.roblox.com/asset/?id=13961515&serverplaceid=0 failed. Trying again. Error: HTTP 403 (HTTP/1.1 403 Forbidden). Elapsed time: 0.893907 87 02:36:04.150 - Content failed for http://assetgame.roblox.com/asset/?id=13961515&serverplaceid=0 because HTTP 403 (HTTP/1.1 403 Forbidden) 02:36:04.150 - Content failed because HTTP 403 (HTTP/1.1 403 Forbidden) 02:36:04.152 - Animation failed to load : Animation

Here is the code in case you need it:

    local tool = script.Parent

    local animation = Instance.new("Animation")
        animation.AnimationId = "https://www.roblox.com/ForceField-Animation-item?id=429484416&rbxp=13961515"

        local animtrack = nil
        local canplay = true


tool.Equipped:connect(function(mouse)
    mouse.KeyDown:connect(function(key)
        if
            key == "q" then
            if
                canplay then
                local player = game.Players.LocalPlayer.Character
                canplay = false
                animtrack = player.Humanoid:LoadAnimation(animation)
                animtrack.KeyframeReached:connect(function(keyframeName)
                    if
                        keyframeName == "ForceEnd" then
                        canplay = true
                    end
                end)
                animtrack:Play()
            end
        end
    end)
end)

0
Do you own the animationd and have you tryed this asset format http://www.roblox.com/Asset?ID=144884906 User#5423 17 — 8y

2 answers

Log in to vote
0
Answered by 8 years ago
    local tool = script.Parent

    local animation = Instance.new("Animation")
        animation.AnimationId = "rbxassetid://429484416" --Do not put the link in. If this doesn't work, try subtracting the 1 but I think that's only decals.

        local animtrack = nil
        local canplay = true


tool.Equipped:connect(function(mouse)
    mouse.KeyDown:connect(function(key)
        if
            key == "q" then
            if
                canplay then
                local player = game.Players.LocalPlayer.Character
                canplay = false
                animtrack = player.Humanoid:LoadAnimation(animation)
                animtrack.KeyframeReached:connect(function(keyframeName)
                    if
                        keyframeName == "ForceEnd" then
                        canplay = true
                    end
                end)
                animtrack:Play()
            end
        end
    end)
end)


Ad
Log in to vote
1
Answered by 8 years ago

You're not correctly inputting the format of the asset in which it should be loaded ingame. You're pasting down an url that is not the asset you need to use to load the animation. Here is how you would fix that, your error is on line '4' replace it with,

animation.AnimationId = "rbxassetid://13961515"
0
You took his rbxp value instead of the ID though. gskw 1046 — 8y

Answer this question