local rp = game:GetService("ReplicatedStorage")
local Punch = rp:WaitForChild("Punch")
local Animations = script:WaitForChild("Animations")
local R15 =
{
["L"] = Animations.R15.Combat1,
["LL"] = Animations.R15.Combat2,
["LLL"] = Animations.R15.Combat3,
}
Punch.OnServerEvent:Connect(function(Player,comSeq)
local Character = Player.Character
local Humanoid = Character.Humanoid
local HumanoidRP = Character.HumanoidRootPart
local Stand = Character:FindFirstChild("Stand")
if Stand then
local AnimControl = Stand:FindFirstChild("AnimControl")
if AnimControl then
local Action
local HumanoidType = AnimControl:FindFirstChild("HumanoidType")
if HumanoidType.Value == "R15" then
Action = AnimControl:LoadAnimation(R15[comSeq])
elseif HumanoidType.Value == "R6" then
print("thats not good :/")
end
Action:Play()
Action.Stopped:Connect(function()
Punch:FireClient(Player,true)
end)
end
else
Punch:FireClient(Player,false)
end
end)
Error:LoadAnimation requires an Animation object
Line:27

3 comments
What does comSeq refer to?
He doesn't know, this code is online and he is trying to debug it without any Lua knowledge.
i do know lua and comseq refers to combat sequence but its fine because i fixed it i didnt reference comseq in the local script