Player not falling down when changing CFrame many times

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.

Physics usually breaks if you change position directly, and that especially extends to collisions. You should be applying force or maybe setting velocity will be good enough, otherwise you need to do your own collision calculations.

Yes what Denneisk said is true, you could try using Linear velocity.As for the wall hitting, you could use raycasting with the direction being the lookvector of the player’s character

unrelated, but, I love asym games and can’t wait to see what you do with this.

ill try this and see if it works

Ive tried using linearvelocity and ive run into a problem, all the tutorials are either outdated or too complicated/not clear. Using linear velocity on the HRP for some reason just wont do anything, the player isint anchored or anything it just doesnt work

u gotta add an attachment and parent it to the hrp.Then in the linear velocity u gotta set the parent to the attachment and set the Attachment0 property to the attachment

also make sure to set MaxForce to a higher number like 99999, 0, 99999. You can change the 0 to a higher number if you want force to occur on the y axes

ive used linear velocity and it works perfectly! thanks a lot,