How to overwrite default animations

So i have tried so many ways to make this work, also searched for tutorials etc but still cant seem to make it work, so i have placed the Animate script inside of StarterCharacterScripts, and set up my own custom animations/ids, but when playing the game for some reason it changes all the animations under the Animate script back to default and plays the default animations.

Before playtesting

During playtest

Could you wait until the default animations load inside your character, delete them, and replace them with new Animations with your ID’s? Disclaimer, I have nearly no experience with animations.

Go inside the script and look for the animNames table edit the ids inside it then playtest.

You didn’t necessarily provide any useful details about your problem, but if you are using R15 animations, and the player is using an animation pack, it resets all of the character’s animations every time their character is loaded.
Not sure if that’s your problem, but if it is, then this script should solve your problems (client-side):

local UpdateAnimateScript = {}

local Players = game:GetService("Players")
local StarterPlayer = game:GetService("StarterPlayer")

local function characterAdded(character : Model)
	local animate = character:WaitForChild("Animate")
	
	for i, animationValue in animate:GetChildren() do
		if #animationValue:GetChildren() <= 0 then
			continue
		end
		
		local clone : Instance = StarterPlayer.StarterCharacterScripts.Animate[animationValue.Name]
		
		animationValue:ClearAllChildren()
		
		for animationName, animation : Animation in clone:GetChildren() do
			if not animation:IsA("Animation") then
				continue
			end
			
			local animationClone = animation:Clone()
			animationClone.Parent = animationValue
		end
	end
end

function UpdateAnimateScript.Init()
	local character = Players.LocalPlayer.Character
	
	Players.LocalPlayer.CharacterAdded:Connect(characterAdded)
	
	if character then
		characterAdded(character)
	end
end

return UpdateAnimateScript
1 Like

I’m pretty sure you have to change it directly in the script

1 Like

solved the problem i was having thanks