this is the full code
func fire():
var bulletinstance = bullet.instance()
bulletinstance.postion = getglobalpostion()
bulletinstance.rotationdegrees = rotationdegrees
bulletinstance.applyimpulse(Vector2(), Vector2(bulletspeed,0).rotated(rotation))
gettree().getroot().calldeferred("addchild",bullet_instance)
someone please help. thanks