Here's a way you can do it, based on what
@rpgLord69 has said in this thread:
If you look at the tile palette, there is a tab labeled "R" that takes you to this colorful number raster. Using this you can paint Regions onto your map. The regions themselves will be invisible during gameplay, but you can use them for various checks.
Pick a number you like, then paint all tiles you DON'T want your player to be able to teleport to with this number. You can draw the outline of your room and use the fill tool to help you out, just like with regular tiles.
Grab two variables you want to store the player coordinates in. Subtract 10 from the Y coordinate, since you want to check the tile 10 spaces up from the player character. Then use Get Location Info to read that tile's Region ID. And store it inside another variable. If the tile can't be teleported to, the command will read the Region ID you painted onto it and store its number inside that variable.
Now you've set everything up that's needed to check whether the teleport is valid. Create two conditional branches that are nested within each other. In one of them, check whether the variable you stored the Region ID is in is NOT EQUAL to the Region ID you painted onto your impassable tiles (1 in my example). Here, if the variable is NOT equal to 1, that means the tile is free to teleport to.
In the second conditional branch, go to tab 4 and select "script". Paste the following into the text field:
Code:
$gameMap.isValid($gameVariables.value(10), $gameVariables.value(11))
Except change the arguments "10" and "11" to the IDs of the variables that hold your x and y coordinates. This will check whether the coordinates stored inside those variables fall outside of the map boundaries, and thus wouldn't be a valid target for teleporting to. If the coordinate does lie within map boundaries, it will return "true" and the location is deemed valid.
Once you've done all this, you put the stuff that actually teleports your player into those conditional checks. You may have to set another variable to the ID of the current map so you can use the "Transfer player" command with variables instead of a direct designation.
Hope this helps.