I’ve been working on this sword system, and for some reason the lunge animation is simply not playing. I don’t know why, it just seems to not work. I’ve attempted to see if i’m even calling the remote event for it, low and behold it is. I’m super confused, so please help me out.
Local Script
--This is all that needs to be seen, also I do know that the event is firing, put this in just in case tho.
if inpObj.KeyCode == Enum.KeyCode.R then
if lungeCooldown == true then return end
lunge:FireServer()
lungeCooldown = true
task.wait(5)
lungeCooldown = false
end
Serverside
script.Parent.LungeAttack.OnServerEvent:Connect(function(plr)
local character = plr.Character
local humanoid = character:FindFirstChild("Humanoid")
local animator = humanoid:FindFirstChild("Animator")
local hrp = character:FindFirstChild("HumanoidRootPart")
local track = animator:LoadAnimation(script.Parent.LungeAnim)
track:Play()
local attacking = false
task.wait(1)
attacking = true
script.Parent.lungeSound:Play()
local hitbox = Instance.new("Part")
hitbox.Parent = workspace
hitbox.Anchored = false
hitbox.Massless = true
hitbox.CanCollide = false
hitbox.Size = Vector3.new(6, 6, 7)
hitbox.CFrame = hrp.CFrame * CFrame.new(0, 0, -5.5)
local weld = Instance.new("WeldConstraint")
weld.Parent = hitbox
weld.Part0 = hrp
weld.Part1 = hitbox
for i, v in pairs(workspace:GetPartsInPart(hitbox)) do
if v == plr then continue end
if v:IsA("Humanoid") then
if v.Parent:FindFirstChild("Sword").IsParrying.Value == true then return end
humanoid:TakeDamage(20)
end
end
task.wait(0.1)
hitbox:Destroy()
task.wait(0.6)
attacking = false
end)
One more thing is that I know this animation exists and the ID is correct, as i’ve animated it and troubleshooted as much as possible, i’m simply stunned as to what this could be.