Need help with adding this line of code

Godot Version

v4.2.1.stable.official [b09f793f5]

Question

So, im using this vid (https://www.youtube.com/watch?v=sVsn9NqpVhg) to learn how to start making 3D games, and after i put the code in the “Using the pitch pivot” part godot crashes when i run the scene.

Here’s my code right now.

extends RigidBody3D

var mouse_sensitivity :=0.001
var twist_input := 0.0
var pitch_input := 0.0

func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)

func _process(delta:float) → void:
var input:=Vector3.ZERO
input.x = Input.get_axis(“move_left”, “move_right”)
input.z= Input.get_axis(“move_forward”,“move_back”)
apply_central_force(input * 1200.0 * delta)
if Input.is_action_just_pressed(“ui_cancel”):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)

$TwistPivot.rotate_y(twist_input)
$TwistPivot/PitchPivot.rotate_x(pitch_input)
$TwistPivot/PitchPivot.rotation_x=clamp(
	$TwistPivot/PitchPivot.rotation.x,
	-0.5,
	0.5
)
twist_input = 0.0
pitch_input = 0.0

func _unhandled_input(event: InputEvent):
if event is InputEventMouseMotion:
if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED :
twist_input = - event.relative.x * mouse_sensitivity
pitch_input = - event.relative.y * mouse_sensitivity

I also get this message whenever i run the game .

Invalid set index "rotation_x (on base:‘Node3D’) with value of type ‘float’

Replace rotation_x with rotation.x.