Animation does not play

I’ve made animations many times before and they always worked and played, but for some reason it doesn’t work here. I do everything as usual. I take the animation:

saved it to roblox, and copied the id.

then created an animation and pasted the idi and pressed enter.

After that I inserted the following code into my local script in starterPlayer:

local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local animationFolder = ReplicatedStorage:WaitForChild("Animations")

local player =game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

local remote = ReplicatedStorage:WaitForChild("Events"):WaitForChild("EarthWallRemote")
local abilitySettings = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("AbilitySettings"))

local debounce = false

UserInputService.InputBegan:Connect(function(input)
	if input.KeyCode == abilitySettings.Abilities[1].key and not debounce then
		debounce = true
		local earthWallAnimation = animationFolder:FindFirstChild("EarthWallAnimation")
		animator:LoadAnimation(earthWallAnimation):Play()
		remote:FireServer()
		print("Ability activated:", abilitySettings.Abilities[1].name)
		
		wait(abilitySettings.Abilities[1].cooldown)
		debounce = false
	end
end)

but for some reason when I press the button there is no animation although everything else works. Why?

P.S. For the test I took another animation from my other game and it is also playable

1 Like

pls make sure the creator of the animation is set to you, if it doesn’t work then idrk

I’ve tried putting both myself and the group, you mean when I load the animation?

try use humanoid:LoadAnimation() and see if it work

what does this mean? did it work when you changed the id to a completely different animation? if so can you send a screenshot of the keyframes of earth wall animation in the animation editor. and send a screenshot of children of the KeyframeSequence. (expand view, click the arrow to the left of the Earth wall animation.)