#Walk animation not working, error code beneath

1 messages · Page 1 of 1 (latest)

torpid herald
#

This is the error:
Failed to load animation with sanitized ID rbxassetid://75901449464023: AnimationClip loaded is not valid. (x5)

  • I have my ID and the animation is owned by me
  • The game is set to R6
  • The animation is made on an R6 dummy
  • The animtion is looped
  • the animations priority is set to movement

I copy the animation script from test play and put it in StarterCharacterScripts and i then change walk ID to my ID
here is the code:
-- humanoidAnimatePlayEmote.lua

local Figure = script.Parent
local Torso = Figure:WaitForChild("Torso")
local RightShoulder = Torso:WaitForChild("Right Shoulder")
local LeftShoulder = Torso:WaitForChild("Left Shoulder")
local RightHip = Torso:WaitForChild("Right Hip")
local LeftHip = Torso:WaitForChild("Left Hip")
local Neck = Torso:WaitForChild("Neck")
local Humanoid = Figure:WaitForChild("Humanoid")
local pose = "Standing"

local EMOTE_TRANSITION_TIME = 0.1

local userAnimateScaleRunSuccess, userAnimateScaleRunValue = pcall(function() return UserSettings():IsUserFeatureEnabled("UserAnimateScaleRun") end)
local userAnimateScaleRun = userAnimateScaleRunSuccess and userAnimateScaleRunValue

local function getRigScale()
if userAnimateScaleRun then
return Figure:GetScale()
else
return 1
end
end

local currentAnim = ""
local currentAnimInstance = nil
local currentAnimTrack = nil
local currentAnimKeyframeHandler = nil
local currentAnimSpeed = 1.0
local animTable = {}
local animNames = {
idle = {
{ id = "http:/www.roblox.com/asset/?id=180435571", weight = 9 },
{ id = "http:/www.roblox.com/asset/?id=180435792", weight = 1 }
},
walk = {
{ id = "http:/www.roblox.com/asset/?id=75901449464024", weight = 10 }
},
Not the whole code ofc

HELP ME PLEASE! Is my studio bugged?

harsh stump
#

i think its because youre putting in the animation id as a link

dark plume
#

try this and change with ur Id's

timber pantherBOT
#

studio** You are now Level 1! **studio

dark plume
#

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

local Animations = {
Walk = "rbxassetid://113174905131767",
Jump = "rbxassetid://124744673361200",
Fall = "rbxassetid://109076418540809",
Idle1 = "rbxassetid://81257315457526",
Idle2 = "rbxassetid://118756195212771",
Crouch = "rbxassetid://121898259772096",
CrouchWalk = "rbxassetid://102422012470909",
RunLowHP = "rbxassetid://77451897573172",
IdleLowHP = "rbxassetid://104029709422442",
WalkLowHP = "rbxassetid://104882670471440",
Sprint = "rbxassetid://122917155859526",

IdleKO = "rbxassetid://126140273781635",
WalkKO = "rbxassetid://101264383487132",
BackKO = "rbxassetid://80440816717067"

}

local loadedAnims = {}

local isCrouching = false
local isSprinting = false
local currentAnimTrack = nil
local currentAnimName = nil

local SPEEDS = {
Walk = 8,
Crouch = 4,
WalkLowHP = 6,
Sprint = 24,
KO = 3
}

local LOW_HP_THRESHOLD
local KO_THRESHOLD

local function loadAnimation(animId)
local anim = Instance.new("Animation")
anim.AnimationId = animId
return humanoid:LoadAnimation(anim)
end

torpid herald
dark plume
#

local function setupAnimations()
loadedAnims = {}
for name, id in pairs(Animations) do
loadedAnims[name] = loadAnimation(id)
end
LOW_HP_THRESHOLD = humanoid.MaxHealth * 0.45 -- 45%
KO_THRESHOLD = humanoid.MaxHealth * 0.25 -- 25%
end

local function playAnimation(name)
if currentAnimName == name then return end
if currentAnimTrack then
currentAnimTrack:Stop()
end
local animTrack = loadedAnims[name]
if animTrack then
animTrack:Play()
animTrack.Priority = Enum.AnimationPriority.Action
currentAnimTrack = animTrack
currentAnimName = name
end
end

local function updateAnimation()
if not humanoid or humanoid.Health <= 0 then return end

local health = humanoid.Health
local speedMagnitude = humanoid.MoveDirection.Magnitude * humanoid.WalkSpeed

-- KO state
if health <= KO_THRESHOLD then
    humanoid.WalkSpeed = SPEEDS.KO
    humanoid.JumpPower = 0
    isCrouching = false
    isSprinting = false

    if speedMagnitude > 0 then
        local moveDir = humanoid.MoveDirection
        local lookDir = character.PrimaryPart.CFrame.LookVector
        if moveDir:Dot(lookDir) > 0 then
            playAnimation("WalkKO")
        else
            playAnimation("BackKO")
        end
    else
        playAnimation("IdleKO")
    end
    return
end
torpid herald
#

ok ill try thank you

dark plume
#

i have send u the the last part of the script

torpid herald
#

where do i put that ?

dark plume
#

in a local script into starter player script ( the end is in ur message )

torpid herald
#

oh i see ty ty

dark plume
#

np

#

tell me if it work

torpid herald
#

I will

dark plume
#

k

torpid herald
#

wait i pasted the script in and changed walk id to my one, also i think it was missing an "end" at the end of the script, but still not working

harsh stump
#

i think you can just change the animation id in the "walk" value inside animation script

dark plume
#

( im french so my lvl is not very good in english sorry )

torpid herald