In order to load far away areas for a Preview, I use :RequestStreamAroundAsync().
Sometimes, it just doesn’t work. At all.
The distance between these two points is around 4000 studs, and the Max Streaming distance is 1024. The actual fast travel points themselves are models set to Persistent streaming mode, so they aren’t streamed out at any time.
It seems to load Parts and Models just fine, but Terrain isn’t loaded at all.
The weird part is that when restarting and doing it from the other direction, it loads the area just fine.
Here is my code. It runs whenever you select a point to Fast Travel to.
plr:RequestStreamAroundAsync(stone.Part.Position)
ts:Create(script.Parent.BlackFrame,TweenInfo.new(0.2),{BackgroundTransparency = 0}):Play()
task.wait(.2)
if plr.InTeleport.Value == true then
if stone:FindFirstChild("CameraAttach") then
workspace.CurrentCamera.CameraSubject = stone.CameraAttach
else
workspace.CurrentCamera.CameraSubject = stone.Part
end
end
ts:Create(script.Parent.BlackFrame,TweenInfo.new(0.2),{BackgroundTransparency = 1}):Play()
Hello! Sorry for the very late reply, but RequestStreamAroundAsync() normally streams the area around your vector temporarily. The player has an actual property to change the focus of the area that should be streamed!
This would both yield until the area has been streamed, and then it would make sure the area will continue to be streamed. Do note that apparently RequestStreamAroundAsync can yield forever? I’m not 100% sure, but the 2nd argument is a Timeout if needed. You can also just remove that line if it causes any issues and keep the ReplicationFocus, the only difference being you’ll get a “Gameplay Paused” warning until it streams in.
To return ReplicationFocus back to the player, it’s as easy as setting it to nil, so
plr.ReplicationFocus = nil
I do apologize if this post is no longer needed since this is 10 months old but I am leaving this here for anyone else who stumbles upon the same problem.
PS:
local Tween = ts:Create(script.Parent.BlackFrame,TweenInfo.new(0.2),{BackgroundTransparency = 0})
Tween:Play()
Tween.Completed:Wait()
is better in this case
EDIT: you are apparently meant to set it on the server. it works for me when i set it on the client via a module though which is VERY strange. do keep it in mind if it doesn’t work for you when you set it on the client.