Can't get animations to change in r15/r6, r15 having problems not r6

I’m trying to make my character change back to the normal animations after they go through a speed run zone in my game.

my character loses all running/walking animations in r15 but works fine in r6

I haven’t been able to find any solutions but there is 100% a way

local RS = game:GetService("ReplicatedStorage")
local animChangesEvent = RS.Remotes.MakeNormal

local player = game.Players.LocalPlayer

local value = false

local function UpdateAnimations()
	local char = player.Character
	if char then 
		for _,anim in pairs(char.Humanoid.Animator:GetPlayingAnimationTracks()) do
			
			char.Humanoid:ChangeState(Enum.HumanoidStateType.Landed)
		end
		char:FindFirstChild("DoubleJumpNormal").Enabled = true
		char:FindFirstChild("DoubleJumpSpeedy").Enabled = false
		if char:FindFirstChild("Torso") then
		char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://180426354" 
		char.Animate.idle.Animation1.AnimationId = "rbxassetid://180435571"
		char.Animate.idle.Animation2.AnimationId = "rbxassetid://180435792"
		char.Animate.jump.JumpAnim.AnimationId = "rbxassetid://125750702"
		char.Animate.fall.FallAnim.AnimationId = "rbxassetid://180436148"
		elseif char:FindFirstChild("UpperTorso") then
			char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://100690327404046"  --!!! I don't work
		char.Animate.idle.Animation1.AnimationId = "rbxassetid://507766666"
		char.Animate.idle.Animation2.AnimationId = "rbxassetid://507766666"
			char.Animate.jump.JumpAnim.AnimationId = "rbxassetid://507765000"
			char.Animate.fall.FallAnim.AnimationId = "rbxassetid://507767968"
			char.Animate.run.RunAnim.AnimationId = "rbxassesid://100690327404046" --!!! I don't work
		end
	end
end

animChangesEvent.OnClientEvent:Connect(function() 
	value = true 
	UpdateAnimations() 
end)

player.CharacterAdded:Connect(function(char)
	if value then 
		UpdateAnimations()
	end
end)

heres the errors

The 2nd asset ID has a typo

"rbxassesid://100690327404046"
--      ^ should be a t

First one looks fine though so I’m not sure what’s causing the error there.

1 Like

The code that you posted isn’t the code producing the error in the output. It seems like the default Roblox Animate script is erroring, perhaps after you meddle with the AnimationIds?

What @ww_waylon09 pointed out might actually fix it. The error seems to be happening because of an invalid animation id, which was caused by the typo - therefore the Animate script cannot create an AnimationTrack resulting in the ‘attempt to index nil with AdjustWeight’ error. It lines up, as the typo is on the Animate.run.RunAnim line, and the error is occuring in a setRunSpeed function in the Animate script.

nvm I still had it spelled wrong lol

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.