Workshop Idea Help

So I’m trying to make a circle that if you’re on. It adds 1 shield per second to your max health. I’m having two problems.

  1. If you step in to the circle X amount of times, the rate then becomes X per second.
  2. If you’ve been inside the circle for Y seconds, if you initially walk back in the circle it immediately adds Y amount of shield to you health.

I have no clue why these problems occur, could someone help?

Code is ODZCY

you are creating many health pools and they stack
basically you are adding the variable of health again when they step in again

1 Like

Do you know of a way that I could fix this system then?

Though you stopped chaseing the variable, If the players’ position is exactly 4, your rule will fail.

Corrected code: [SAYKY]

I’m in school, so I can’t explain things rn.

Ooh, so basically the only things I was
Doing wrong, I had the “Add health pool” under the wrong rule so it added in when stepped in, like colestcat said earlier. And I had the distance < and > 4, rather than <= and >.
Thank you a lot I understand it now

1 Like