I'm working on a script and im currently stuck :\ basically when a player steps on a tile players in a specific area will be teleported to temple, im able to do it but when the players are in the same floor, but when they're in different floors it doesnt work at all. this is what i currently have:
my goal is to teleport players even if they're in a different floor, but in the same rectangle if that makes sense thanks.
Code:
local topLeft = {x = 997, y = 997, z = 8}
local bottomRight = {x = 1005, y = 1007, z = 4}
local temple = {x = 60, y = 54, z = 7}
function doRemoveRunners()
for index, creature in ipairs(getPlayersOnline()) do
if isInArea(getThingPos(creature), topLeft, bottomRight) then
doTeleportThing(creature, temple)
end
end
return true
end