Animation Override script doesnt do anything

Hello

So I’ve made this script that overrides the plyr character’s “Animate” script(or rather the children of said script), as I want to change the jump animation to a backflip. When I run the game, nothing happens, the jump animation isn’t affected.

One weird thing I did notice is that the name of the jump animation is “!ID!” for whatever reason, weird.

The animation does work by the way, I’ve changed the jump id manually while the game was running and it worked fine so that isn’t the problem.

Also, the animation is for R15 characters only, if that helps


game.Players.PlayerAdded:connect(function(player)
		player.CharacterAdded:connect(function(character)
		player.Character.Animate.jump:FindFirstChildOfClass("Animation").AnimationId = "http://www.roblox.com/asset/?id=12725752297"
		end)
end)

Thanks!

I found a fix! Just use a local script in StarterGui and change the referencing

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()

character:WaitForChild("Animate").jump:FindFirstChildOfClass("Animation").AnimationId = "http://www.roblox.com/asset/?id=12725752297"

You can change this from a script in ServerScriptService, check the Documentation

Wait, I’m a bit confused, what do you mean? This might be an interesting optimization

Basically, there’s a script you can write, which overrides the classic @Roblox Animations, it’s somewhere in the Documentation, I’ll link it when I find it

local Players = game:GetService("Players")
local runAnimation = "yourAnimation"

local function onCharacterAdded(character)
    local humanoid = character:WaitForChild("Humanoid")

    local animateScript = character:WaitForChild("Animate")
    animateScript.run.RunAnim.AnimationId = runAnimation
end

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

Players.PlayerAdded:Connect(onPlayerAdded)

This script overrides the default running animation, more info in the Documentation

1 Like

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