Skip to main content

StreamingUtils

Provides utilities for working with Roblox's streaming system

Functions

promiseStreamAround

StreamingUtils.promiseStreamAround(
playerPlayer,
positionVector3,
timeOutnumber?--

Optional

) → Promise

Promises to stream the area around the player at the given position. See Player.RequestStreamAroundAsync. Can be called on both the client and the server.

StreamingUtils.promiseStreamAround(Players.LocalPlayer, Vector3.new(0, 10, 0), 30)
	:Then(function()
		print("Done streaming")
	end)

Returns a resolved promise if streaming is not enabled as the area is guaranteed to be streamed in already.

warning

Requesting streaming around an area is not a guarantee that the content will be present when the request completes, as streaming is affected by the client's network bandwidth, memory limitations, and other factors.

Show raw api
{
    "functions": [
        {
            "name": "promiseStreamAround",
            "desc": "Promises to stream the area around the player at the given position. See [Player.RequestStreamAroundAsync]. Can\nbe called on both the client and the server.\n\n```lua\nStreamingUtils.promiseStreamAround(Players.LocalPlayer, Vector3.new(0, 10, 0), 30)\n\t:Then(function()\n\t\tprint(\"Done streaming\")\n\tend)\n```\n\nReturns a resolved promise if streaming is not enabled as the area is guaranteed to be streamed in already.\n\n:::warning\nRequesting streaming around an area is not a guarantee that the content will be present when the request completes,\nas streaming is affected by the client's network bandwidth, memory limitations, and other factors.\n:::",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                },
                {
                    "name": "position",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "timeOut",
                    "desc": "Optional",
                    "lua_type": "number?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 37,
                "path": "src/streamingutils/src/Shared/StreamingUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "StreamingUtils",
    "desc": "Provides utilities for working with Roblox's streaming system",
    "source": {
        "line": 5,
        "path": "src/streamingutils/src/Shared/StreamingUtils.lua"
    }
}