How to override the player's animations?

Now, before you say, “Check other topics for the solution!”, hear me out.

I have looked through so many youtube tutorials on how to do this, and I have looked through roblox topics, and no matter what I do, the animations just don’t work.

The steps I am following;

Play the game and copy the Animate local script from the player’s character,
paste it into the StarterCharacterScripts,
change the RunAnim AnimationId to 115845223351509 and WalkAnim Animation Id to 93681090384779.
(It’s a group game, and I uploaded both animations to the group)
It’s an R15 animation and the character spawns in as R15.
What am I doing wrong?

2 Likes

“Animation’s won’t work” what exactly happens?

My bad. Animations just stay my character’s animations instead of the ones I’m trying to make it use.

Have you tried also editing the code ?

I have (text filler)(text filler)

1 Like

I am not 100% sure, but isn’t there a way to disable character/player animations within your game on studio?

I have no idea. (text filler)(text filler)

  1. Play the game, go into your character, and steal the animation script
  2. Put the script inside StarterCharacterScripts so it overrides the default one given when you join the game
  3. Apply the animations to it with their respective priorities (if you have animations that have a low/same priority, the might mix together)

I mentioned how to do this in a post a few years ago that seemed to work, but I cant say it will forever.

1 Like

How do I change priorities? (Annoying text filler)

Here:

local Player = game:GetService("Players").LocalPlayer
local Character = workspace:WaitForChild(Player.Name)
local AnimateScript = Character:FindFirstChild("Animate")
if AnimateScript then
	AnimateScript:Destroy()
end
local Humanoid = Character:WaitForChild('Humanoid')

local RunID = 88867726336340
local WalkID = 137599098519961
--local IdleID = 123952796982267
--local JumpID = 140408712765788
local RunningSpeed = 20
local NormalSpeed = 14
local FieldOfView = 80
local key = "LeftShift"

local RunAnimation = Instance.new('Animation')
RunAnimation.AnimationId = 'rbxassetid://'..RunID

local WalkAnimation = Instance.new('Animation')
WalkAnimation.AnimationId = 'rbxassetid://'..WalkID

--local IdleAnimation = Instance.new('Animation')
--IdleAnimation.AnimationId = 'rbxassetid://'..IdleID

--local JumpAnimation = Instance.new('Animation')
--JumpAnimation.AnimationId = 'rbxassetid://'..JumpID

local RAnimation = Humanoid:LoadAnimation(RunAnimation)
RAnimation.Priority = Enum.AnimationPriority.Movement

local WAnimation = Humanoid:LoadAnimation(WalkAnimation)
WAnimation.Priority = Enum.AnimationPriority.Idle

--local IAnimation = Humanoid:LoadAnimation(IdleAnimation)
--IAnimation.Priority = Enum.AnimationPriority.Core

--local JAnimation = Humanoid:LoadAnimation(JumpAnimation)
--JAnimation.Priority = Enum.AnimationPriority.Action

--JAnimation:AdjustSpeed(1.3)

Running = false

for i, v in pairs(Humanoid:GetPlayingAnimationTracks()) do
	v:Stop()
end

local Info = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local Properties = {FieldOfView = FieldOfView}
local T = game:GetService("TweenService"):Create(game.Workspace.CurrentCamera, Info, Properties)
local rProperties = {FieldOfView = 70}
local rInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local rT = game:GetService("TweenService"):Create(game.Workspace.CurrentCamera, rInfo, rProperties)

function Handler(BindName, InputState)
	if InputState == Enum.UserInputState.Begin and BindName == 'RunBind' then
		Running = true
		Humanoid.WalkSpeed = RunningSpeed
		T:Play()
	elseif InputState == Enum.UserInputState.End and BindName == 'RunBind' then
		Running = false
		if RAnimation.IsPlaying then
			RAnimation:Stop()
		end
		Humanoid.WalkSpeed = NormalSpeed
		rT:Play()
		--if Humanoid.MoveDirection.Magnitude == 0 and not IAnimation.IsPlaying then
		--	IAnimation:Play()
		--end
	end
end

Humanoid.Running:Connect(function(Speed)
	if Speed >= 10 and Running and Humanoid.MoveDirection.Magnitude > 0 then
		if not RAnimation.IsPlaying then
			RAnimation:Play()
		end
		Humanoid.WalkSpeed = RunningSpeed
		T:Play()
	elseif Speed >= 10 and not Running then
		if not WAnimation.IsPlaying then
			WAnimation:Play()
		end
		Humanoid.WalkSpeed = NormalSpeed
		rT:Play()
	elseif Speed < 10 then
		if RAnimation.IsPlaying then
			RAnimation:Stop()
		end
		if WAnimation.IsPlaying then
			WAnimation:Stop()
		end
		--if not IAnimation.IsPlaying then
		--	IAnimation:Play()
		--end
		Humanoid.WalkSpeed = NormalSpeed
		rT:Play()
	end
end)

game:GetService('ContextActionService'):BindAction('RunBind', Handler, true, Enum.KeyCode[key])

Humanoid.StateChanged:Connect(function(oldState, newState)
	if newState == Enum.HumanoidStateType.Jumping then
		--JAnimation:Play()
	end
end)

I commented all the stuff that I don’t think you’ll need (jump & idle) but if you want to use it ever its always there

I am using this in my current game :sweat_smile:

pst… put this in startercharacterscripts

2 Likes

Oh my god. I don’t how and why, but this works. I spent so much time trying to figure this out. THANKS

1 Like

Haha, I’ve been there, no sweat!

Enjoy

1 Like