Change a variable for a specific area (Bug?)

Why doesn’t it work ?

can you post your code?