You’re incrementing TeleporterNum
twice, so you’re probably ending up trying to fetch a teleporter that doesn’t exist in the array, also you might want to use this method to avoid fetching indexes out of array length
# Returns the remainder of `X/Y` as defined by Euclidean division, i.e.:
# * `Mod[X,Y] = X - Quotient(X/Y)*Y`
# * `0 <= Mod[X,Y] < Abs(Y)`
# Fails if `Y=0`.
Mod<native><public>(X:int, Y:int)<computes><decides>:int