With the following snippet from a script: I expected the outcome to be: but instead I get: Does anyone know why this is happening and how I can fix it? In case you need it here is SelectTile: Answer You are not assigning the new int value to the original variable. Here’s a fix: