RandomTP
#2
Hello, and welcome to the forum Smile

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.
Reply
Thanks given by:


Messages In This Thread
RandomTP - by Keith - 08-30-2015, 12:01 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 12:11 AM
RE: RandomTP - by Keith - 08-30-2015, 01:12 AM
RE: RandomTP - by DiamondToaster - 08-30-2015, 01:34 AM
RE: RandomTP - by Keith - 08-30-2015, 02:01 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 02:07 AM
RE: RandomTP - by Keith - 08-30-2015, 04:39 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 04:45 AM
RE: RandomTP - by Keith - 08-30-2015, 04:50 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 04:53 AM
RE: RandomTP - by Keith - 08-30-2015, 04:59 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 05:02 AM
RE: RandomTP - by Keith - 08-30-2015, 06:53 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 07:01 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 07:06 AM
RE: RandomTP - by tigerw - 08-30-2015, 09:02 AM
RE: RandomTP - by NiLSPACE - 08-30-2015, 05:58 PM
RE: RandomTP - by NiLSPACE - 08-31-2015, 04:24 AM
RE: RandomTP - by xoft - 08-31-2015, 06:09 AM



Users browsing this thread: 5 Guest(s)