I’m trying to replace the tile, but I get an error
main/scripts/onClick.script:36: Instance main:/BaseContainer/House#dtt not found
This is line number 36
tile = tilemap.get_tile(“main:/BaseContainer/House#dtt”, ‘layer’, 2, 2)
I also added a screenshot of the project hierarchy
Please tell me, what am I doing wrong?
your script (oneClick) is inside the game object “House” and the path you call in the code is misspelled :
(tile = tilemap.get_tile(“main:/BaseContainer/House#dtt”, ‘layer’, 2, 2))
Try typing: tile = tilemap.get_tile("#dtt", ‘layer’, 2, 2) 
ps. everything that’s inside “House” you call it “#sprite” as example.
whatever is outside of “House” you call “go#sprite” or “main/go#sprite” as example,
as long as your script (oneClick) is hosted in “House” 
1 Like
Thx,
linking onclick to House was a good idea. (It was pinned to the BaseContainer in the beginning)
it wasn’t a bad idea for oneClick to be a child of BaseContainer, just by writing the code correctly you would make it work. So the line would look like this as long as oneClick is a child of BaseContainer:
tile = tilemap.get_tile(“House#dtt”, ‘layer’, 2, 2) as example. 
ps. happy to help. 
1 Like