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

Why is this animaiton not playing when I start the script?

Asked by
Neon_N 104
6 years ago

Script below is localscript.

-- Variables --
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteStorage = ReplicatedStorage:WaitForChild("RemoteEvents")
local Remote = RemoteStorage:WaitForChild("ForwardDashEvent")

local plr = game.Players.LocalPlayer
local Char = plr.Character or plr.CharacterAdded:Wait()

local userinput = game:GetService("UserInputService")

-- Settings --
local Debounce = true
local pressed = time()
local waitTime= .25

local Animation = Instance.new("Animation")
Animation.AnimationId = 'rbxassetid:2589911948'

userinput.InputBegan:connect(function(Input, IsTyping)
    if IsTyping then return end
    if Input.KeyCode == Enum.KeyCode.W and Debounce then
       if time() - pressed < waitTime and Debounce then
    Debounce = false
        local LoadAnimation = Char.Humanoid:LoadAnimation(Animation)
        LoadAnimation:Play()
        Remote:FireServer("Dash")
        wait(1)
        Debounce = true
        else
        end
        pressed = tick()
    end
end)

The Output is keep saying Animation "rbxassetid:2589911948" failed to load in "Animation.AnimationId": Animation failed to load two times every time I start the script. Can you give me the solution?

0
That is because you do not own the animation. The animation needs to be yours. User#24403 69 — 6y
0
rbxassetid://2589911948 ... you have the wrong assetID ForeverBrown 356 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

So, there are two things this could be. It's either that you don't own the animation, or you got the ID wrong. Most likely it's that you don't own the animation. If you can, try importing the animation in animation editor, and export it as your own, then use the new one instead of the old one. I don't understand why Roblox does it like this, but it just does. For some reason Roblox just makes it show up an error unless the owner of the animation makes the script, even if the animation is in a group, it still does this.

Ad

Answer this question