Hello,
I have a script here that changes the player’s animations, in a server script in serverscriptservice. However, I have run into a problem. I have a walk and a run animation, and I changed both in the script with the ID’s. The walk animations works perfectly, however, whenever I speed up the player, instead of playing the run animation, it just plays the walk animation. I am really confused, and I have attached a video. I set the run animation priority to action, it didn’t work, and I switched it to movement, and it still did not work.
Here is the script:
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.run.RunAnim.AnimationId = "rbxassetid://9980674946" -- Run
animateScript.walk.WalkAnim.AnimationId = "rbxassetid://9963713930" -- Walk
animateScript.idle.Animation1.AnimationId = "rbxassetid://8947964659" -- Idle (Variation 1)
animateScript.idle.Animation2.AnimationId = "rbxassetid://8947964659" -- Idle (Variation 2)
animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119" -- Climb
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)