Animation not playing?

I’m trying to load an animation when a player presses the Key E however the animation doesn’t play and it doesn’t throw any errors.


local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local Camera = workspace.Camera
local UIS = game:GetService("UserInputService")
local KeyBind = "E"
local repstor = game:GetService("ReplicatedStorage")

local selectedScene
local animClone = repstor.Animations.anim:Clone()
animClone.Parent = Character
local anim = Character:WaitForChild("Humanoid"):WaitForChild("Animator"):LoadAnimation(animClone)

--- this section of the code doesn't matter

UIS.InputBegan:Connect(function(input,Chatting)
	if Chatting then return end
	if input.KeyCode == Enum.KeyCode[KeyBind] then 
		anim:Play()
	end
end) ```
3 Likes

I seem to encounter the same issue as you even by using Roblox’s documentation tutorials.

I can also read in the log the following:
Asset (Animation) “https://assetdelivery.roblox.com/v1/asset?id=2515090838&serverplaceid=0” load failed in Animation.AnimationId: Animation failed to load

Maybe there is an issue on Roblox’s side.

Have a nice day.

Oh my god i feel so dumb rn
I was attempting to play an r6 animation on my avatar, which is r15.
Silly me there is nothing wrong with my code.

1 Like

I hope I wasn’t either doing the same thing, else I would be very dumb as well :grinning:

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