how do I fix "invalid get index 'source' (on base: 'InputDefault')"?

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

I’ve very new to coding and I’m not sure what to do…

here is my code:

extends KinematicBody2D

const MAX_SPEED = 100
const FRICTION = 25

var velocity = Vector2.ZERO

func _physics_process(_delta):
var input_vector = Vector2.ZERO
input_vector.x = Input.source.get_action_stregth(“ui_right”) - Input.source.get_action_stregth(“ui_left”)
input_vector.y = Input.source.get_action_stregth(“ui_up”) - Input.source.get_action_stregth(“ui_down”)
input_vector = input_vector.nomalized()

if input_vector != Vector2.ZERO:
	velocity = input_vector * MAX_SPEED
	velocity = velocity.clamped(MAX_SPEED)
else:
	velocity = velocity.move_toward(Vector2.ZERO)

move_and_slide(velocity)
:bust_in_silhouette: Reply From: jgodfrey

I’m not sure where you got that .source addition. The 4 places in the above code that read Input.source.get_action_strength(... should instead read Input.get_action_strength(...