I’m attempting to make a dash ability in my game, the video below is what I’ve made
however, for some reason, when using the ability over air the character bugs out and does not fall to the ground, the player would also phase through parts so I had to code in going up ramps and ramming into walls. What I want is the player to still be able to fall down and go up ramps without bugging out. Here’s my code below.
for i = 2, 0, -0.05 do
SprtSpeed += -45
WalkSpeed += -10
Player.Character.Humanoid.WalkSpeed = 0
Player.Character.HumanoidRootPart.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -4)
MakeHitbox(0, 6.5, 3, 5)
task.wait(0.01)
if lungehit == true then
PlayAnimEvent:FireAllClients(Player, "LungeHit")
Player.Character.HumanoidRootPart.Anchored = false
break
end
if lungehit == "Wall" then
Player.Character.HumanoidRootPart.Anchored = false
break
end
end
The make hitbox function just makes the little red hitboxes, Sprtspeed and walkspeed are just values that determine the players movement speed, lunge hit is how i detect if the hitboxes hit a wall or a enemy, if you want the code for those things ask me and ill give it.