Invalid get index 'position' (on base:bool)

Godot Version

4.2

Question

i am trying to make teleport pads that teleport the player from the teleport pad to the receive pad but i get the error in the title of this post. how can i resolve?

here is my code

extends Node3D

var player = is_in_group("player")

var recievepad = is_in_group("RecievePad")

var can_tp: bool = false

func _on_area_3d_body_entered(body):

if "Player" in body.name:

can_tp = true

if can_tp:

player.position = recievepad.position + Vector3(0,3,0)

It seems that receivepad is a boolean, not a Node3D instance. Perhaps you wanted to use body.position? The same for player.

oh okay, that makes a whole lot of sense now. I have it fixed and working as intended! Thanks!