I managed to get it to work by doing this:
| Global number MouseY = 0
| Global number MouseX = 0
| Global number TileY = 0
| Global number TileX = 0
+ System: Every tick
-> System: Set MouseX to Mouse.X
-> System: Set MouseY to Mouse.Y
-> System: Set TileX to Tilemap.PositionToTileX(MouseX)
-> System: Set TileY to Tilemap.PositionToTileX(MouseY)
-> Text: Set text to "TileX" & TileX & " TileY" & TileY
+ Mouse: On Left button Clicked on Tilemap
-> Tilemap: Set tile (TileX, TileY) to tile 2 (normal)