# Does set() work differently in P5.JS than it does in Processing?

**URL:** <https://discourse.processing.org/t/does-set-work-differently-in-p5-js-than-it-does-in-processing/3570>\
**Category:** Coding Questions\
**Created:** [September 16, 2018, 11:02am UTC](https://discourse.processing.org/t/does-set-work-differently-in-p5-js-than-it-does-in-processing/3570 "2018-09-16T11:02:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HoboGreed](https://avatars.discourse-cdn.com/v4/letter/h/da6949/32.png) [@HoboGreed](https://discourse.processing.org/u/HoboGreed)\
**Post date:** [September 16, 2018, 11:02am UTC](https://discourse.processing.org/t/does-set-work-differently-in-p5-js-than-it-does-in-processing/3570/1 "2018-09-16T11:02:43Z")

</div>

`point(250,250)` draws a point but `set(250,250,255)` does not.

```auto
function setup() {
  createCanvas(500,500);
  }

function draw() {
  background(0);
  stroke(255);
  point(250,250);
  set(252,250,255)
  
}

```

---

<div class="post-metadata">

**Author:** ![julian2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/julian2/32/1551_2.png) [@julian2](https://discourse.processing.org/u/julian2)\
**Post date:** [September 16, 2018, 11:48am UTC](https://discourse.processing.org/t/does-set-work-differently-in-p5-js-than-it-does-in-processing/3570/2 "2018-09-16T11:48:10Z")

</div>

hmm, yeah there seems to be slight differences in how they work ([reference | p5.js](https://p5js.org/reference/#/p5/set))

> After using set(), you must call updatePixels() for your changes to appear.

after adding `updatePixels()`, it seems to work

> **[p5.js Web Editor](https://editor.p5js.org/julian2/sketches/BJTtMas_m)**
>
> A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.
