Godot Version
4.3
i could really use some help knowing what i messed up
here is the error
Invalid access to property or key ‘positiion’ on a base object of type ‘CharacterBody2D (ballphysics.gd)’.
and here is the code
extends Node2D
var ball = preload(“res://scene/ball.tscn”)#how i link to the ball tscn for spawning
var newinstance = ball.instantiate()
.
func _process(delta: float) → void:
if Input.is_action_just_pressed(“shake”):
ball.instantiate()
newinstance.positiion.x =$Paddle.position.x
add_child(newinstance)