Help in changing default animations

I need help in changing default animations in game. The thing is, I have a walking animation and a running animation. But when I try to go ahead and run, the run animation just doesn’t work???

Here’s a video (run script is from a different place):

VIDEO:

How do I make it change BASED on speed? And how do I change the fade in and out of each animation?

P.S.I don’t want to put the animation with the run script, cause that’ll just override the animations, and it’ll look pretty funky.

Roblox recently changed how animations work. now theres different animations depending on the direction your walking in.
image


if you for example want to change the run animation change all the different run animations to your animation.

1 Like

That’s only for r15, my game’s for r6. And plus what I’m only asking for is how to play the run animation when the player is, well, running.

Well if ur using R6 simply change the animation inside the animate script.:slightly_smiling_face:
image

image
I would recommend doing it from a StarterCharacterScript. (i think its easier)

I’ve tried two methods, the ServerScriptService, and the StarterCharacterScripts. Hasn’t worked on both.

Could you provide the script your using?

Taken from a page in the Official Roblox site.

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://11209207590"        -- Run
	animateScript.walk.WalkAnim.AnimationId = "rbxassetid://11208876511"      -- Walk
	animateScript.jump.JumpAnim.AnimationId = "rbxassetid://11277652937"      -- Jump
	animateScript.idle.Animation1.AnimationId = "rbxassetid://11208955249"    -- Idle (Variation 1)
	animateScript.idle.Animation2.AnimationId = "rbxassetid://11208955249"    -- Idle (Variation 2)
	animateScript.fall.FallAnim.AnimationId = "rbxassetid://616157476"      -- Fall
	animateScript.swim.Swim.AnimationId = "rbxassetid://616165109"          -- Swim (Active)
	animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655"  -- Swim (Idle)
	animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119"    -- Climb
end

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

Players.PlayerAdded:Connect(onPlayerAdded)

Link: Using Animations | Roblox Creator Documentation

image
i dont think theres an animation named swim, try removing that?

I removed all things that aren’t changed, but it didn’t work still.

i just started a r6 place and i think the new animations are still there, even tho im using r6


try changing all run animations, i guess?

Could you maybe give the script?

this works for me.

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://11209207590"        -- Run
	animateScript.runBack.RunBackAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runBackwardLeft.RunBackwardLeftAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runBackwardRight.RunBackwardRightAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runForwardLeft.RunForwardLeftAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runForwardRight.RunForwardRightAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runLeft.RunLeftAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runLeft2.RunLeft2Anim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runRight.RunRightAnim.AnimationId = "rbxassetid://11209207590"        -- Run
	animateScript.runRight2.RunRight2Anim.AnimationId = "rbxassetid://11209207590"        -- Run

end

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

Players.PlayerAdded:Connect(onPlayerAdded)

Nope, doesn’t work. Could you show a video of it working?

sure! (im using my own animation with the same script)

btw if your making a new game i suggest using r15 because r6 have some issues.

No, no, you don’t understand, maybe? I’m trying to make the character RUN when I SPRINT, but it only plays the WALKING animation. I want it to not have that to happen

Sorry if this comes out rude but I’m just stuck with this problem for a couple hours now.

This is what I’ve come up so far, the run works but the walking just doesn’t.

function onRunning(speed)
	if speed >= 8 then
		playAnimation("run", 0.5, Humanoid)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.5, Humanoid)
			pose = "Standing"
		end
	end
	if speed <= 6 then
		playAnimation("walk", 0.1, Humanoid)
		pose = "Walking"
	end
end
1 Like