# Need help with slider

**URL:** https://discourse.processing.org/t/need-help-with-slider/28512
**Category:** Coding Questions
**Created:** [March 13, 2021, 9:19pm UTC](https://discourse.processing.org/t/need-help-with-slider/28512 "2021-03-13T21:19:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jemo](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@Jemo](https://discourse.processing.org/u/Jemo)
#### Post date: [March 13, 2021, 9:19pm UTC](https://discourse.processing.org/t/need-help-with-slider/28512/1 "2021-03-13T21:19:49Z")

</div>

So I have a slider and it works and all but how do I get the output to be used as a variable? basically when I move the slider it supposed to change the angle of a force but its not working.  
thanks

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [March 13, 2021, 11:06pm UTC](https://discourse.processing.org/t/need-help-with-slider/28512/2 "2021-03-13T23:06:32Z")

</div>

can you show your code please?

are you using controlp5? Check its examples (website: [processing GUI, controlP5](http://www.sojamo.de/libraries/controlP5/))

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [March 14, 2021, 6:25pm UTC](https://discourse.processing.org/t/need-help-with-slider/28512/3 "2021-03-14T18:25:29Z")

</div>

> [@Slider and box rotation](https://discourse.processing.org/t/slider-and-box-rotation/28071):
>
> import controlP5.\*; ControlP5 cp5; Slider boxSize; Slider2D rotate; ColorWheel col; Toggle start; void setup() { size(800, 600, P3D); cp5 = new ControlP5(this); boxSize = cp5.addSlider("BOX SIZE") .setPosition(20, 20) .setRange(0, 400) .setValue(200); rotate = cp5.addSlider2D("ROTATION") .setPosition(20, 40) .setSize(100, 100) .setMinMax(1.0, 1.0, 10.0, 10.0) .setValue(2.0, 2.0); start = cp5.addToggle("START/STOP") .setPosition(20, …
