Not sure what I did wrong but it isn't working and I need help.

local player = game.Players.LocalPlayer local Character = player.Character or script.Parent local humanoid = player.Character.Humanoid local Humanoid = Character.Humanoid local UIS = game:GetService("UserInputService")

local AnimationId = 'rbxassetid://6267230901'

UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then if player.Character ~= nil then

		while player.Character.Humanoid.WalkSpeed >= 50 do 
			wait()

			local Animation = Instance.new("Animation")
			Animation.AnimationId = AnimationId
			local LoadAnimation = Humanoid:LoadAnimation(Animation)
			LoadAnimation:Play()

		end
	end
end

end)

UIS.InputEnded:Connect(function(input) if input.KeyCode == Enum.KeyCode.LeftShift then if player.Character ~= nil then player.Character.Humanoid.WalkSpeed = 16

		while player.Character.Humanoid.WalkSpeed <= 16 do 
			wait()

			local Animation = Instance.new("Animation")
			Animation.AnimationId = AnimationId
			local LoadAnimation = Humanoid:LoadAnimation(Animation)
			LoadAnimation:Stop()

		end
	end
end

end)

1 comment

0

did you use moon animating or original animator bc in the normal one u have to enable movement to movement animations