i made a way to do it but its very inefficient and doesnt always work. i made a singleton and put a variable for bullet position. then i converted that to tilemap position and deleted any tile that was in that position. the problem is that it only works with the most recent bullet.
for the tilemap
extends TileMap
var bp
func _physics_process(delta):
bp = world_to_map(global.bullet_position)
set_cell(bp.x,bp.y,-1)
for the bullet
extends RigidBody2D
var timer = 1
func _process(delta):
if timer >= 0:
timer -= delta
else:
queue_free()
global.bullet_position = position
if theres any better way please let me know.