I think most of the code to do this was given in your previous question:
Here is a simple script explaining how you can move a sprite:
extends Sprite
# Have a constant to hold how fast you want to move,
# for example 100 pixels per second
const SPEED = 100.0
# Have a variable to hold the movement direction of your sprite
var move_direction = Vector2()
func _ready():
# Tell Godot to call _process() every frame
set_process(true)
func _process(frame_time):
# Detect when the player presses keys
if Input.is_key_pressed(KEY_LEFT):
move_direction = Vector2(-1, 0)
elif Input.is_key_pressed(KEY_RIGHT):
move_direction = Vector2(1, 0)
elif Input.is_key_pressed(KEY_UP):
move_direction = Vector2(-1, 0)
elif Input.is_key_pressed(KEY_DOWN):
move_direction = Vector2(1, 0)
# Note: usually we set the direction to zero if the player doesn't presses any key,
# but here you want to continue moving, so we leave move_direction as it is.
# Calculate how many pixels the sprite has to move.
# This formula takes the time between frames into account, so
# if the game lags a bit, the sprite will still move at the same speed
var motion = move_direction * SPEED * frame_time
# Change the position of the sprite, so it will appear to move
set_pos(get_pos() + motion)