Parser Error: ',' or ')': im doing a movement system and a system for move the camera

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By blinkingcape

extends KinematicBody

var velocity = Vector3(0,0,0)
const SPEED = 8
const MOUSE_SENSITIVITY = 0.1

func _ready():
pass

func _physics_process(delta):
if Input.is_action_pressed(“ui_right”) and Input.is_action_pressed(“ui_left”):
velocity.x = 0
elif Input.is_action_pressed(“ui_left”):
velocity.x = SPEED
elif Input.is_action_pressed(“ui_right”):
velocity.x = -SPEED
else:
velocity.x = lerp(velocity.x,0,0.1)

if Input.is_action_pressed("ui_up") and Input.is_action_pressed("ui_down"):
	velocity.z = 0
elif Input.is_action_pressed("ui_down"):
	velocity.z = -SPEED
elif Input.is_action_pressed("ui_up"):
	velocity.z = SPEED
else:
	velocity.z = lerp(velocity.z,0,0.1)
move_and_slide(velocity)
move_and_slide(velocity)

func _process(delta):
$CamRoot.rotate_x(deg2rad(event.relative.y:MOUSE_SENSITIVY-1))

Your code is unreadable. Please post it using proper formatting. There is a button in the edit box.

kidscancode | 2023-04-02 17:13

:bust_in_silhouette: Reply From: Hanate

I’m not 100% sure, but in your last line, I think there should no be a ‘:’ before MOUSE_SENSITIVITY

$CamRoot.rotatex(deg2rad(event.relative.y:MOUSE_SENSITIVY-1))
                                         ^
                                        here