Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Frostcatzz |
This is my Code:
var speler = AudioStreamPlayer.new();
var first_time = true
var is_playing = false
func _physics_process(delta):
if Input.is_action_just_pressed("primary_fire"):
if first_time:
self.add_child(speler);
speler.stream = load("res://Sounds/GunShot.wav");
first_time = false
if not is_playing:
speler.play(true);
is_playing = true
Is something wrong? when i press the key its doesnt play a sound
The key input for “primary_fire” = Left Click
Pls help me