Unable to edit placed tilemap in paper2d

Hello, I’ve been playing around with paper2d, but I’m not sure why this isn’t working

What’s (supposed) to be happening in the photo is a button press draws a line downwards to get the first tilemap below the character, which then the found tilemap gets casted, before attempting to change the top-right tile in the tilemap to a new sprite. It’s all executing fine, but the tile in the tilemap isn’t changing, what am I doing wrong?