Animation script not working

im getting errors for some reason
image

local Tool = script.Parent
local 10bladeanimation = script.Parent:WaitForChild("10bladeanimation", 1)

Tool.Activated:Connect(function()
	local Character = Tool.Parent
	if Character then
		local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
		if Humanoid then
			local LoadedAnim = nil
			if Humanoid.RigType == Enum.HumanoidRigType.R6 and 10bladeanimation then
				LoadedAnim = Humanoid:LoadAnimation(10bladeanimation)
			end
			if LoadedAnim then
				LoadedAnim:Play()
			end
		end
	end
end)
1 Like

Get rid of the numbers for the variable.

2 Likes

The variable is underlined in red… you cannot start a variable with numbers.
Try doing local bladeanimation10 instead

2 Likes