-- A simple script for opening doors function tick(timestep) playerX = Player:getAbsCoorX() playerY = Player:getAbsCoorY() playerZ = Player:getAbsCoorZ() doorTriggerX = DoorTrigger:getAbsCoorX() doorTriggerY = DoorTrigger:getAbsCoorY() doorTriggerZ = DoorTrigger:getAbsCoorZ() radius = (playerX - doorTriggerX)^2 + (playerY - doorTriggerY)^2 +(playerZ - doorTriggerZ)^2 if radius < 10 then door:open(true) else door:open(false) end return false end