local rp = game:GetService("ReplicatedStorage")
local Punch = rp:WaitForChild("Punch")
local TweenService = game:GetService("TweenService")
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 Controller = Stand.PrimaryPart:FindFirstChild("Controller")
if Controller then
local goal = {}
goal.C0 = Controller.Part0.CFrame:ToObjectSpace(Controller.Part1.CFrame)
goal.C1 = Controller.Part0.CFrame:ToObjectSpace(Controller.Part1.CFrame * CFrame.new(0,.25,-3))
local info TweenInfo.new(.25)
local Tween = TweenService:Create(Controller,info,goal)
Tween:Play()
end
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: Argument 2 missing or nil
Line:31

2 comments
thank you
no problem!