Animation not even playing

You can write your topic however you want, but you need to answer these questions:

  1. I’m trying to play an animation that is published by the same group that the game is published under. Using :Play() on the player’s animator the action layer is 4 and no other animations are playing

  2. Well the animation is not even playing.

  3. I have tried republishing the animation multiple times. Waiting for the animation to load ( It apparently loads instantly?)

I’m making a game where ledge climbing can be done via proximity prompts and whenever I try to play the climb animation the player just stands still (Even outside the editor?)

There are some gifs that show the issue

robloxapp-20230326-1654441
robloxapp-20230326-1655412

Here is the script I am using.

function climb(player)
	local animator = player.Character.Humanoid.Animator
	local climbAnim = animator:LoadAnimation(script.Climb)
	local humanoid = player.Character.Humanoid
	local RootPart = player.Character.HumanoidRootPart
	local ledge = script.Parent.Parent.Parent
	
	humanoid:MoveTo(ledge.StartingPos.Position)
	humanoid.MoveToFinished:Wait()
	
	RootPart.CFrame = ledge.StartingPos.CFrame
	
	climbAnim:Play()
	game.ReplicatedStorage.ToggleAnimationCamera:FireClient(player,true)
	
	climbAnim.Stopped:connect(function()
		game.ReplicatedStorage.ToggleAnimationCamera:FireClient(player,false)
		RootPart.CFrame = ledge.EndingPos.CFrame
	end)
	
	wait( 0.75 )
	game.ReplicatedStorage.ToggleAnimationCamera:FireClient(player,false)
	RootPart.CFrame = ledge.EndingPos.CFrame
end

script.Parent.Triggered:Connect(climb)

you are just connecting the climb function, you are not sending the player with the function.

image

image

The thing is it is still teleporting the player. So it seems to be sending the player? If it isn’t can you tell me how to? – Thanks Alex

well im just saying it doesnt know what player to apply the animations to, since the player is not sent with the function

So should I just have the function be built into the connect instead of being seperate?

Triggered events and similar events automatically send the player who triggered the event as the first parameter.

all his animations rely on that second parameter. the teleport does not.

image

The player wouldn’t teleport if it didn’t depend on the Player parameter.

The problem in the script has to do with the animation.

in the top 2 videos, it looks to me that your animating w/ r15 and player is r6?? idk thats just what it looks like to me

I’m animating with r6 and the player is r6 too.

Try now?

function climb(player)
	local animator = player.Character.Humanoid -- Removed Animator
	local climbAnim = animator:LoadAnimation(script.Climb)
	local humanoid = player.Character.Humanoid
	local RootPart = player.Character.HumanoidRootPart
	local ledge = script.Parent.Parent.Parent
	
	humanoid:MoveTo(ledge.StartingPos.Position)
	humanoid.MoveToFinished:Wait()
	
	RootPart.CFrame = ledge.StartingPos.CFrame
	
	climbAnim:Play()
	game.ReplicatedStorage.ToggleAnimationCamera:FireClient(player,true)
	
	climbAnim.Stopped:connect(function()
		game.ReplicatedStorage.ToggleAnimationCamera:FireClient(player,false)
		RootPart.CFrame = ledge.EndingPos.CFrame
	end)
	
	wait( 0.75 )
	game.ReplicatedStorage.ToggleAnimationCamera:FireClient(player,false)
	RootPart.CFrame = ledge.EndingPos.CFrame
end

script.Parent.Triggered:Connect(climb)

Still not working for some reason. I guess its just a bug with roblox.

Or animation might be playing, but it is a different action, set it to core animation and possibly try…?

Humanoid:LoadAnimation is deprecated, plus Humanoid is defined just after.

How do you load animations then?

Same way as you did in your original script, Humanoid.Animator:LoadAnimation().

You’re right, but shouldn’t we remove animator because there’s really no use unless you’re using it to customize other things from the animation, instead of

local climbAnim = animator:LoadAnimation(script.Climb)

we could do

local humanoid = player.Character.Humanoid
local climbAnim = humanoid:LoadAnimation(script.Climb)

(remove animator variable by the way)
This could possibly work

Also Obvious, is the Animation posted to the actual owner of the group or player? Example: Game is owned by you, is the animation also owned by you or a group?

he said it in the very first post, they’re both posted by the same group.

oh alr, im stuck here for nbow