Hello, and welcome to the forum
You can use this:
But keep in mind that a player can now be teleported inside block. If you use this:
the player should teleport to the highest block instead.
You can use this:
local BlockID = Player:GetWorld():GetBlock(X, Y, Z) if ((BlockID == E_BLOCK_GRASS) or (BlockID == E_BLOCK_DIRT) or (BLOCKID == E_BLOCK_SAND)) then -- Teleport the player end
But keep in mind that a player can now be teleported inside block. If you use this:
local X = math.random(-2000, 2000) local Z = math.random(-2000, 2000) local Succes, Y = Player:GetWorld():TryGetHeight(X, Z)
the player should teleport to the highest block instead.