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

RunAnim is not working, yet all the other animations are. Why is this happening?

Asked by 4 years ago

I've copied the code from the Roblox Developer page:

===============================================

local Players = game:GetService("Players")

local function onCharacterAdded(character)

local humanoid = character:WaitForChild("Humanoid")

for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
    playingTracks:Stop(0)
end

local animateScript = character:WaitForChild("Animate")
animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://658833139"

end

local function onPlayerAdded(player) player.CharacterAppearanceLoaded:Connect(onCharacterAdded) end

Players.PlayerAdded:Connect(onPlayerAdded)

===============================================

But when I change the climb.ClimbAnim to run.RunAnim, it raises this error:

08:05:21.008 - RunAnim is not a valid member of StringValue 08:05:21.009 - Stack Begin 08:05:21.010 - Script 'ServerScriptService.animationHandler', Line 11 08:05:21.011 - Stack End

===============================================

Why is this happening?

Answer this question