Heres a video of the problem: Works - Roblox Studio 2023-06-18 18-21-52
The problem is seen in the video, animation doest work propery.
heres the code:
local function BigHitFunction(player)
local char = player.Character
local Hrpt = char:WaitForChild("HumanoidRootPart")
local CombatFolder = Hrpt:WaitForChild("CombatFolder")
local Combo = CombatFolder:FindFirstChild("Combo")
local ComboTime = CombatFolder:FindFirstChild("ComboTime")
local LastHand = CombatFolder:FindFirstChild("LastHand")
local Anim:AnimationTrack = nil
local Hum:HumanoidDescription = char:WaitForChild("Humanoid")
local NewDamage = BaseDMG + 5*Combo.Value
local HitboxAnchorHand = nil
if char:FindFirstChild("Humanoid").Health > 0 and CombatFolder:FindFirstChild("Stunned").Value == false and CombatFolder:FindFirstChild("Blocking") == nil and CombatFolder:FindFirstChild("CanAttack").Value == true then
local FillerAnim:AnimationTrack = Hum:LoadAnimation(ClientPickNThrow.Filler)
FillerAnim:Play()
-- filler animation is the animatino that plays until i want the finisher to play ( incase their is no victim)
HitboxAnchorHand = char:WaitForChild("UpperTorso")
local NewHitbox = Hitbox:Clone()
NewHitbox.Parent = HitboxFolder
NewHitbox.Position = HitboxAnchorHand.Position + Vector3.new(0,0,-NewHitbox.Size.Z/2+0.25)
local Weld = Instance.new("WeldConstraint",NewHitbox)
Weld.Part1 = HitboxAnchorHand
Weld.Part0 = NewHitbox
NewHitbox.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name ~= player.Character.Name then
local HitHum = hit.Parent.Humanoid
local HitHRPT = HitHum.Parent:FindFirstChild("HumanoidRootPart")
if HitHum.Health > 0 then
HitHum.WalkSpeed = 0
Hum.WalkSpeed = 0
--HitHRPT.Position = Hrpt.Position + Vector3.new(0,0,-5)
FillerAnim:Stop()
local ClientAnim = Hum:LoadAnimation(ClientPickNThrow)
ClientAnim:Play()
local VictimAnimation = HitHum:LoadAnimation(VictimPickNThrow)
VictimAnimation:Play()
NewHitbox:Destroy()
HitHum:TakeDamage(NewDamage) --> go to module l8r
--knockback, rmemoved till anim works
--local OppKnockback = Instance.new("BodyVelocity")
--OppKnockback.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
--OppKnockback.Parent = HitHRPT
--OppKnockback.Velocity = char:FindFirstChild("HumanoidRootPart").CFrame.LookVector * 40
--OppKnockback.Name = "Knockback"
--game.Debris:AddItem(OppKnockback,.3)
local VFXClone = BigHit:Clone()
VFXClone.Parent = HitHum.Parent:WaitForChild("HumanoidRootPart")
for i,v in VFXClone:GetChildren() do
v.Parent = VFXClone.Parent
v:Emit(100)
end
delay(0.44,function()
HitHum.WalkSpeed =16
Hum.WalkSpeed = 16
end)
end
delay(0.44,function()
NewHitbox:Destroy()
end)
end
end)
Combo.Value= 0
ComboTime.Value = 0
print("reset")
end
```