Hello,
I’m attempting to make an ability where the player slams down in the air. However, when the player hits the ground they bounce off like this:
https://gyazo.com/27cceadd5384a63cf9b8a40e2d841746
What can I do to prevent this? This is the current logic I’m using but it isn’t working:
if distance > 0 then
local velocity = Instance.new("BodyVelocity")
local speed = (-distance)*1.5
velocity.Name = "SwordSlamVel"
velocity.Parent = hrp
velocity.MaxForce = Vector3.new(0,math.huge,0)
velocity.Velocity = Vector3.new(0,speed,0)
elseif distance == 0 then
--when humanoid:GetState("Landed") is true, this code runs
if hrp:FindFirstChild("SwordSlamVel") then
hrp.SwordSlamVel:Destroy()
hrp.AssemblyLinearVelocity *= Vector3.new(0,0,0)
end
end
Any advice would be great, thanks