Making an animation play on the player when a proximityprompt is activated

I’ve been trying to animate the player when they hide under a table for days now, but every time the animation plays, it plays halfway, then reverses, and then ends right where it started.

This is my current (relevant) code.

-- Animate the player
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://16845753534"
local humanoid = plr.Character:FindFirstChild("Humanoid")
humanoid.Animator.Looping = false
local loadAnim = humanoid.Animator:LoadAnimation(anim)
loadAnim:Play()

This is running in a server script.
Any ideas?

What does the animation look like in an animation editor?

In the editor it plays fully and doesn’t loop.

What does the player look like when the animation begins and what is the priority level of your animation?

did you set the animation in the Animation editor as CORE or ACTION priority?

Animations should be handeled from the client (I think) as the player has the NetworkOwnership

1 Like