Crouch Animation doesn't works

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

  1. What do you want to achieve? Keep it simple and clear!
    I want to achieve that if you press the key C your avatar starts crouching and when your character is not moving the animation stops.
  2. What is the issue? Include screenshots / videos if possible!
    Nothing works. The strange thing is that the messages get printed but the animation doesn’t plays.
    Here is a Video of how it should look like:

    (literally my first animation)
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried debugging and made sure that i published the animation
    Here is the Script:
local player = game.Players.LocalPlayer
local UserInputService = game:GetService("UserInputService")
local Humanoid = player.Character:FindFirstChild('Humanoid')
local Animation = Instance.new("Animation", player.Character)
Animation.AnimationId = "rbxassetid://10031055282"
local Animate = Humanoid:LoadAnimation(Animation)

UserInputService.InputBegan:Connect(function(Key)
	if Key.KeyCode == Enum.KeyCode.C then
		print("running")
		Animate:Play()
	end  
end)

UserInputService.InputEnded:Connect(function(Key)
	if Key.KeyCode == Enum.KeyCode.C then
		print("stopped")
		Animate:Stop()
	end
end)

player.Character:WaitForChild("Humanoid").Running:Connect(function(speed)
	if speed > 0 then
		Animate:AdjustSpeed(1)
	else
		Animate:AdjustSpeed(0)
	end
end)

Any help would be appreciated!

oh i fixed it, so sorry :confused: i made a dumb mistake

Hey, what was the mistake? I need to know as I had a similiar problem!

I edited the Script so that it works now. I think the problem was that I made the function Animation:Play() instead of Animate:Play()… what was your problem back then? Oh, also I have a question, Ive remade the Animation and it looks like this now:


But in Game the Animation looks kind of broken…
(it just doesnt looks like the made animation…)

any suggestion would help!!!

I think this is because of the accessories you’re wearing or it’s a ROBLOX bug becaue I’ve seen a lot of about animations not looking the same in game

1 Like

Maybe i should make the same animation with moon animator?

Perhaps, only if Moon Animator is easier to use.

1 Like

ok i made the animation in moonanimator and now i solved the problem but there are 1 other problem now: 1. when i press c the animation only plays 1 time…

You probably forgot to turn loop mode on in the animation?

1 Like

How to do that? :smiley: (character limit)

There should be a icon that looks like this:

help

I found the loop in the animation itself and that fixed everything (omg). Here is the Vid:


Im so happy rn tysm!!!

Glad you got everything figured out, have a good day. Let me know if you need anything.

2 Likes