I'm making a flappy bird style game, but I'm having a problem with Slider, I think it's something with a library or the way I declare the variable or createSlider, but I tried to change and nothing solves the design is not original my it comes from the channel "the codding train, Coding Challenge # 41: Clappy Bird!" it uses this variable exactly in 11:42 in the video I will leave attached the link and the code.
var bird; //variável passaro
var pipes = []; //variavel das paredes
var mic;
var slider;
function setup() {
createCanvas(400, 600); //tamanho da janela 400x600
mic = new p5.AudioIn(); //para chamar a biblioteca de microfone
mic.start(); //para aparecer o pop up no navegador para aceitar a usar o microfone
bird = new Bird(); //para mostrar o passaro na tela
pipes.push(new Pipe()); //para mostrar as paredes
slider = createSlider(0, 1, 0.2, 0.01);
}