Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Player won't carry out animation?

I was trying to do a crouch animation for my game. This LocalScript was in StarterCharacterScripts and a child which was an animation called "Animation". The output doesn't show any errors but the player doesn't carry out the animation. Here's the script:

local UserInput = game:GetService("UserInputService")
local humanoid = script.Parent:WaitForChild("Humanoid")
local Animation = humanoid:LoadAnimation(script.Animation)
local Running = false

UserInput.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.C  then
		if not Running then
			Running = true
			Animation:Play()
			humanoid.WalkSpeed = 10
		else
			Animation:Stop()
			Running = false
			humanoid.WalkSpeed = 16
		end
	end
end)

1 comment

0

use the animation track inside the humanoid and try loading the animation on a server script

1 answer

Is your animation's AnimationPriority higher than Core? You can set this in the script with

Animation.Priority = Enum.AnimationPriority.Action

2 comments

0

OK thanks, I'll see if that works

0

Sorry, it doesn't work still

This discussion is preserved as it was. New answers, comments, and votes are closed.