How to detect if Terrain around player is Loaded

so, my game uses streaming enabled, because the terrain is 10Kx10K studs

when the player teleports to a far point (the game has a WayPoint System as it has a big map)

it teleports well, but the terrain have a bad looking loading and i want to delay the loading screen close until the terrain has fully loaded.

it takes like 20 seconds to remember to put my grass on floor, and increase the terrain polygons, and while the player watch it mutates freely

If you set the StreamingIntegrityMode to PauseOutsideLoadedArea it will pause the game until the area is loaded. Also use RequestStreamAroundAsync to preload the area before teleporting the player

image

hmm maybe the request thing would be useful, but i already use the PauseOutsideLoadedArea thing… the thing i need is to wait until the area the player is around to load before closing the loading screen.

You’re saying RequestStreamAroundAsync doesn’t close when the area is loaded? Does it close before it’s loaded?

tbh i didint tested it yet, and i presumed it would only load a expecific area… but if it delays the script until its done that would be the solving of all my problems… i’ll test it

Try something like this:

local teleportArea = CFrame.new(50, 5, 50)

player:RequestStreamAroundAsync(teleportArea.Position, 5) --The second parameter is a timeout
player.Character:PivotTo(teleportArea)

well… i implemented it on my script but it doesnt wait until it gets fully loaded, or at least a bit…

here’s the important part of my script:

  WayPointMenu.ToggleMenu:Fire(false)
  require(Player.PlayerGui.LoadingScreen.ModuleScript).Toggle(true)
  task.wait(1)
  Player:RequestStreamAroundAsync(WayPointIns.Handle.Position, 5)
  Character.PrimaryPart = Character:WaitForChild("HumanoidRootPart")
  Character:PivotTo(CFrame.new(WayPointIns.Handle.Position))
  require(Player.PlayerGui.LoadingScreen.ModuleScript).Toggle(false)
1 Like