make the numerical values of a UI slider visible

Hi! I am trying to make the numerical values of a UI slider visible.
For doing it I firstly created a slider, then a UI text to which I assigned a script (called ShowValueSlider, see below). Then, on the slider inspector, I modified the part “on value changed (single)” grabbing the UI text and expecting to find “textUpdate” as dynamic float but it doesn’t work.
Does anyone know why?
Thank you!

Here is the script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class ShowValueSlider: MonoBehaviour
{
    Text percentageText;

    // Start is called before the first frame update
    void Start()
    {
        percentageText = GetComponent<Text> ();
    }

    // Update is called once per frame
    public void textUpdate (float value)
    {
        percentageText.text = Mathf.RoundToInt(value);
    }
}

Cant you just access the slider class directly?

    Slider slider;

    public float sliderValue;

    private void Start()
    {
        slider = GetComponent<Slider>();
    }

    private void Update()
    {
        sliderValue = slider.value;
    }