Noob Question- Cant Move Player Psition in Main Scene

Godot Version

4.3

I have set up the following as separate scenes:
Background
Player
Ball
Collisions

All the scenes are instanced from the background scene, but when i try to pre view my game all I see is the player

The collision scene tree structure is as follows:

image

Background
image

Ball

image

and finally the player scene
image

The problem is that i cant move the player to the other side of the court- inside the collision box:

Can anyone help?

Double-check which scene is set as your main scene in Project Settings > Run > main scene:
image

This is the scene run with the play button in the editor. Maybe this is set to the player scene instead of the background scene?

if i do that, the preview window shows the player and nothing else, should i try to instantiate the other scenes in the player scene?

From your screenshots, your main scene should be your background scene. Is this the case?

Another troubleshooting step would be to open your background scene and press F6. This runs the current scene rather than your main scene.

yes, background is my main scene, the game preview moves the player automatically, while the preview scene of my background scene doesnt even let the player mov. I think there might be some issue with the colliders. Here are my scripts for your kind reference:

ball.gs

extends CharacterBody2D

const SPEED := 400.0
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	velocity = Vector2(-SPEED, 0)


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
	var col := move_and_collide(velocity)
	if col:
		var normal := col.get_normal()
		velocity = velocity.bounce(normal)
		move_and_slide()

My player scene code is as follows:

extends CharacterBody2D
const SPEED := 200.0

func getYDir() -> float:
	return Input.get_action_strength("move_left") - Input.get_action_strength("move_right")

func _physics_process(delta: float) -> void:
	
	var dir :Vector2=Vector2(0, getYDir())
	velocity = dir * SPEED
	move_and_slide()

I feel i must mention that I am trying to modify a pong tutorial into a tennis game.

here is the collision scene with my player instance. I cant even get the player to move:

I think I need some help understanding your setup. What do you mean by “preview”. You won’t be able to “control” the player unless the game is running.

If you are having trouble dragging the player around in the editor, then that’s a whole other issue.

Change your Nodes to Node2Ds, children can’t inherit position if their parent is a Node (without position)