Hi, the bellow example might help, im not sure if it's saving on touch, but it will show you the structure that local saving needs to follow. To modify it for touched object you just replace the trigger that is saving in the example file and save after you made variable updates.
So your conditional structure should look something like:
On touched sprite :
Action 1 add to score 5
Action 2 localstorage set item "score" value = score
Where the first "score" is the key name as text and the value is the actual global variable.
localstorage+level C3 r139 i think, im not sure about the version used, should work with latest C3 though R139 or above.
However if you are having the ability to tap multiple times to change the score variable, id suggest saving the score, every 1 or 2 seconds that way you avoid spams (think cookie clicker type of game, or tap to cash).
You can also save every 10 seconds or when user goes back to main menu screen or has intent to close application.
On the last suggestion the user might lose some data let's say battery dies out or he closes it by mistake, so the saving local has to be done for game progress, this method isn't meant for In App Purchases, for IAP's you need to update a online server store somewhere to make sure transactions are safe and out of the reach of malfunctions.
The tutorial section on forum should have something about this.
Hope it helps. Have fun!