Invalid set index ‘position’ (on base: ‘RigidBody2D’) with value of type ‘Vector2’

Godot Version 4

extends CharacterBody2D

signal laser(position)
signal grenade

var can_laser: bool = true
var can_grenade: bool = true

func _process(_delta):

var direction = Input.get_vector("left", "right", "up", "down")
velocity = direction * 500
move_and_slide()

if Input.is_action_just_pressed("primary_action") and can_laser:
	var laser_markers = $LaserStartPosition.get_children()
	var select_laser = laser_markers[randi() % laser_markers.size()]
	can_laser = false
	$LaserTime.start()
	# emit the postion we selected
	laser.emit(select_laser.global_position)
	
if Input.is_action_just_pressed("secondary_action") and can_grenade:
	can_grenade = false
	$GrenadeTime.start()
	var pos = $LaserStartPosition.get_children()[0].get_global_position()
	grenade.emit(pos) #Here's where the debug highlights

func _on_laser_time_timeout():
can_laser = true

func _on_grenade_time_timeout():
can_grenade = true

extends Node2D

var laser_scene: PackedScene = preload(“res://Scenes/projectiles/laser.tscn”)
var grenade_scene: PackedScene = preload(“res://Scenes/projectiles/grenade.tscn”)

func _on_gate_player_entered_gate(body):
print(“player has entered gate”)
print(body)

func _on_gate_player_exit_gate(_body):
print(“player has exited gate”)

func _on_player_laser(pos):
var laser = laser_scene.instantiate()
laser.position = pos
$Projectiles.add_child(laser)

func _on_player_grenade(pos):
var grenade = grenade_scene.instantiate()
grenade.postion = pos # Here’s where the debug highlights
$Projectiles.add_child(grenade)

I’m following a tutorial and came across an issue were the game keep freezing when I try to throw my grenade.

Its a typo.
You typed postion instead of position.
In the future please use the code tag </> when posting code here.
PS: You should also copy the error message rather than type it out.

sorry for the late replay, Thanks