Creating an attack and LinearVelocity is acting weird. Here’s the sample of code (eHRP is the victim’s humanoidrootpart).
Attachment.WorldPosition = eHRP.AssemblyCenterOfMass
local lv = Instance.new("LinearVelocity", eHRP)
lv.VelocityConstraintMode = "Vector"
lv.VectorVelocity = Vector3.new(0, 70, 0)
lv.MaxForce = math.huge
lv.Attachment0 = Attachment
wait(0.8) -- Wait for the enemy to lift into the air
eHRP.AssemblyLinearVelocity = Vector3.new(0, 0, 0)
eHRP.Anchored = true
lv:Destroy()
Attachment:Destroy()
local sledgeAnim = Instance.new("Animation")
sledgeAnim.AnimationId = "http://www.roblox.com/asset/?id=14350194734" -- Load sledgehammer anim
HRP.CFrame = eHRP.CFrame * CFrame.new(0, 1, -3.5) * CFrame.Angles(0, math.rad(180), 0) -- Teleports the player in front of the victim
local sledgehammer = Humanoid:LoadAnimation(sledgeAnim)
sledgehammer:Play() -- Play the sledgehammer
wait(0.6) -- Wait for the sledgehammer to hit the player
eHRP.Anchored = false
wait(0.5)
HRP.Anchored = false
I’ve tried moving the animation around in different spots and altering some of the positions, but nothing’s working. Here’s a video showing the issue: