The “tilemap.get_tile()” won’t return a tile if the input position is “out of range” as mentioned in the error message.
So, I’d try to check your input position before the call, e.g. by printing the position.
I.e. if the player is outside of the tilemap, you won’t get a tile, so you’ll need to check for that.
1 Like
Ok, thank you! I think you just gave me some inspiration on how to do this! And thank you to @britzl too, for being so patient with me and helping me a lot!