RandomTP
#6
The chunk is most likely not loaded. Try this:
local X = math.random(-2000, 2000)
local Z = math.random(-2000, 2000)
local _, Height

local World = Player:GetWorld()
World:ChunkStay({math.floor(X / 16), math.floor(Z / 16)}, nil, 
	function()
		_, Height = World:TryGetHeight(X, Z)
	end
)

It will ensure that the chunks are loaded and then get the height.


Btw, I didn't test this code. There might be a syntax error in it.
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: 1 Guest(s)