[Solved] Farm game tilling ground

I used the grid part of the stardew valley tutorial on the gdevelop youtube channel but when i tried to make the player be able to till the ground it didn’t work. I used a tiled sprite for the regular ground and then when the e key is pressed, it’ll create a sprite called dirt where ever the grid marker is except it only remains there as long as the e key is pressed and also moves with the grid. If there is any way around this, please let me know.

nevermind, i got it working, it turns out that i was setting the z order of the dirt too low