Play is not a valid member of Animation "Players.How4rdy.PlayerScripts.Dash.LDAnimation"

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 was making a system when you click q or e u would dash but when i play the game it shows an error: 17:44:04.698 Play is not a valid member of Animation “Players.How4rdy.PlayerScripts.Dash.LDAnimation”

local RightDashAnim = script:WaitForChild("RDAnimation")
local LeftDashAnim = script:WaitForChild("LDAnimation")
local Player = game:GetService("Players").LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local LeftDashingAnim = hum:LoadAnimation(LeftDashAnim)
local RightDashingAnim = hum:LoadAnimation(RightDashAnim)
local UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.Q then
		wait()
		LeftDashAnim:Play()
	end
end)

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		wait()
		RightDashAnim:Play()
	end
end)

Try Replacing LeftDashAnim:Play() and RightDashAnim:Play() with LeftDashingAnim:Play() and RightDashingAnim:Play()

i realized i made a typo thanks

1 Like

No problem, glad i could help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.