My player shoots on pc but not on android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By rafax3x

I made my character shoot on my computer with the following code:

var bala = load(“res://escenas_guardadas/bullet.tscn”)

func disparar():
if !self.reload.is_stopped():

var newbala = bala.instance();
newbala.global_position = $posbala.global_position;
newbala.dir = 1


and for it to work I try to call this in 2 ways:

  1. if Input.is_action_pressed(“ui_d”):
  2. func _on_TouchScreenButton_pressed():

And these work perfectly on my computer but when I test on several devices either by export or with the mobile creator mode it does not fire even though the animation of the button is pressed correctly, it is as if it will not call the bullet instance when I press the button
Does anyone have an idea how to help me please?

:bust_in_silhouette: Reply From: GibberishDevelopment

Just try to set in inspector for touchscreen button “action” to uid