Animation not playing

Hello. I made a script for an attack but for some reason, the animation called “loadedcutp2” doesn’t play whatsoever. It is currently set to Action priority, but I tried previously to set it to action 4 but it still did not work. Help is appreciated, thank you.

if input.KeyCode == Enum.KeyCode.E then
		local stunned = player.Character:GetAttribute("Stunned")
		local debouncewait = false
		local debounce = 0
		if not debouncewait and (stunned == false or stunned == nil) then
			debouncewait = true
			player.Character.Humanoid.WalkSpeed = 0
			local loadedCutp1 = player.Character.Humanoid:LoadAnimation(cutp1)
			local camera = workspace.CurrentCamera
			local rayorigin = camera.CFrame.Position
			local rayDirection = camera.CFrame.LookVector * 100
			local rayparams =
			rayparams.FilterDescendantsInstances = {player.Character, player.Character.sword}
			rayparams.FilterType = Enum.RaycastFilterType.Exclude
			local rayresults = workspace:Raycast(rayorigin, rayDirection, rayparams)
			if rayresults and (rayresults.Instance.Parent == workspace.BossModel or rayresults.Instance.Parent.Parent == workspace.BossModel) then
				humanoid.RootPart.CFrame = *,0,-2)

				local loadedCutp2 = player.Character.Humanoid:LoadAnimation(cutp2)
				print("no results")
			player.Character.Humanoid.WalkSpeed = 16
			debouncewait = false
1 Like

anybody? this is a major part of my game and I could use the help

you sure cutp1 has animation id?

1 Like

Check the output, it may output cannot load sanitized id. Unfortunately, I’ve encountered this problem many times, and its just a roblox thing tbh. I’ve heard its because under a different group or something, but there’s really no documentation on it that I could find atleast. One of the reasons why I quit Roblox ngl. Good luck on your game!

1 Like

Here is a bit more if you would like to read up on it. By the looks of it, it seemed to have been fixed? I am not sure, though.

1 Like

It’s cutp2 that has the problem, and yes, it has an ID

1 Like

There aren’t any errors in the output

1 Like

Anybody? I still need help solving the issue.

Is it the correct id? Try republishing it cuz this normally isn’t supposed to happen without an error

Hello, we have released an improvement to the error reporting when animations failed to load. It should provide additional context that will help you (and us) debug the specific issue.

Honestly, I forgot I replied to this post lol. Unfortunately I am not working on the game (or any games) anymore as I quit to the exact problem you have fixed (and some others).

Thank you so much though, I appreciate you making future developers have a better experience with Roblox as a whole and be able to create games that they have dreamed upon. :smile: