func _unhandled_input(event):
if event is InputEventScreenTouch and event.pressed == true:
(event.position) # the position of the touch
InputEventScreenTouch
and things like InputEventKey
and so on just describe the input event, so you use if event is Input...
to first check if the event is the right one, before running any code on it (or else you'll get errors).
In this case it's also necessary to check if event.pressed == true
or else the code will run also run when the player un-touches (twice in one tap).
Good luck!