It’s actually quite a simple thing to do. You can simply add the transfrom.forward and the transfrom.right before multiplying extra values like speed. Additionally you ought to multiply everything by Time.deltaTime to avoid having frame drops affect the movement speeds.
.normalized prevents whatever it is your moving from moving fast diagonally
Time.deltaTime makes the movement framerate independent ie. the movement speed won’t change if the framerate does
@kadenathompson well your above code needs a little modification cause ofcourse it solves one problem but it will also show up another new problem which is the y axis, as you are constantly setting the y-axis it will affect the movements on y axis like falling and jumping so to solve you have to add rb.velocity.y on y axis like this