I am working on a punch animation, but it says that the animation is ‘invalid’.
Here is my source:
local _d = require(script._d)
local Services =
{
UIS = game:GetService('UserInputService')
}
local PlrChar = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local Animator = PlrChar:WaitForChild('Humanoid'):FindFirstChildWhichIsA('Animator')
local aPunch = Instance.new('Animation')
aPunch.AnimationId = _d._PunchAnim
local LoadedAnims =
{
Punch = Animator:LoadAnimation(aPunch)
}
Services.UIS.InputBegan:Connect(function(iO,gPe)
if not gPe and iO.KeyCode == Enum.KeyCode.F then
if game.ReplicatedStorage.Vals._GameActive then
_d._Event:FireServer()
LoadedAnims.Punch:Play()
end
end
end)