so click on your HScrollbar or VScrollbar node in your Scene tree, over on the top right side of godot you should see
Inspector Node History
click on Node
you should see under signals
scrolling()
and
value_changed(value:float)

scrolling() would be when the player grabs the HScrollbar and moves it around
value_changed(value:float) would be when the player stops moving it around and it sits on a value, that will be a float number

right click over value_changed(value:float) and click on the connect
"Connect" it to the node with your script that is best for you.

func _on_v_scroll_bar_value_changed(value: float) -> void:
	pass # Replace with function body.

should show up with a nice green arrow pointing at a ]

you can then use that value:float for what you want to do like moving the robot in your game
perhaps something like

@onready
var Robot : AnimatableBody2D = $AnimatableBody2D
func _on_v_scroll_bar_value_changed(value: float) -> void:
	Robot.position.x=value*10

    So basically the easiest way would be to use a ScrollContainer ?

    So far I've only seen Containers used for the UI, is there a reason not to use them for the game itself ?
    (in my case it's not an action game, but a turn-per-turn non-interactive game : basically a checkerboard where the player puts cards)

    Do a simple test and find out.

    I tried but the results aren't great...
    A ScrollContainer is designed to accept only one child node, but whatever I use it doesn't really work as expected (notably, I don't see the scrollbar).
    From the docs the Control Node that seems to be AspectRatioContainer, but even that didn't work properly when I made the example.tscn nodes (from chunuiyu's Card Framework) become children of the ARC.

    Or should I use a Control node that isn't a Container ?

    Is there a good tutorial somewhere ? The ones I used are a bit light on these topics.

      LienRag I don't see the scrollbar

      I think I've only used ScrollContainer's whose child is another Container.

      You may need to make the child container smaller than the ScrollContainer, to make room for the ScrollBar.

      DaveTheCoder Thanks !
      I tried the Asset Library with zero success, but apparently that's because I searched for "scrollbar" rather than "scroll"...

      @Spyrex are you the developer of the Smooth Scrool add-on ?
      Will it work the way I need it ?

      After looking at them it seems that the add-ons that may help what I need would be either Scrolling Backgroung Tools or Flipscreen Library With Scrolling.
      But the first is a bit bare (not sure that I understand what it does - edit: it doesn't even have a scrollbar, so not what I'm looking for alas), and the second is for Godot 3. I can't even download it from Godot itself (and if I download it from the web I can't load it into Godot - not sure why; anyway from the readme it doesn't do what I want, though maybe I can get ideas from the code)...

      AlexanderGodot

      I want to use the scrollbar to move the camera in my game; I think that I can figure out how to do that from your explications and other things I've read elsewhere.
      What I don't know how to do is to have the scrollbar realistically show what part of the full scene is shown on screen (what a scrollbar is supposed to do).

        LienRag

        you can set the scroll to have "values" that correlate to the position on the screens you want the camera to move to...
        set a min and a max value for the scroll....
        set what increment you want to "step" towards the min/max (by .1, 1, 2, 5, 10, whatever)...
        you set the camera position based off the values that are used for the scroll....
        when the scroll is "scrolled" it will tell the camera via signal what its "amount" is....
        and the camera position will correlate to that value...