I want to randomize the pitch of a sound every time it plays. I'm triying to change the sound's pitch_scale with a random float between 1.0 and 0.5.

    var random_value = randf_range(0.5, 1.0)

      KermexRPG By the way in Godot 4 you have something like AudioStreamRandomizer resource. It can randomize pitch out of the box without custom code needed at all.