(Redirected from API:Content)
< Scripting | Data Types
Content is a data type that is closely related to a string. In fact, it is a string. Usually, a content data type is a link to a file. On some objects, setting the property that uses this value type is forbidden.

Diagram showing how links get passed.

On Roblox, the ContentFilter service causes any links to files not on one of the Roblox sites or on the trusted sites to not load. The picture on the right shows how the filter works.

How content is formatted[edit]

Content can be formatted in many ways. All of which either point to an online file or a file saved to the client's computer. The basic structure is a protocol name, followed by ://, then a string that depends on the protocol used.


Here is a table of valid protocols:

Protocol String Description
rbxasset A file path. Fetches a file from Roblox's content folders.
http A website URL. Fetches content from a website using a URL.
https A website URL. Same as http, but for pages that require https.
rbxhttp A path on the Roblox website. Fetches content from the Roblox website.
rbxassetid An existing asset ID. Fetches a user-created asset on the Roblox website.



This starts from Roblox's content folder on the user's computer.



Any file in this folder can be used, including ones that users have added themselves. Though it will only appear for that user, since it's only on the user's computer.

Here's the location of the content folder for various operating systems:

Windows XP
C:\Documents and Settings\<username>\Local Settings\Application Data\RobloxVersions\<version>\content
Windows Vista/7/8


rbxhttp://directory This basically just adds the directory to the end of ContentProvider.BaseUrl.

For example:


Might expand to:

Which gives Roblox's avatar.


rbxassetid://assetId This points to a user-created asset on the site. It's much easier than typing out the entire URL, but also disallows finding things like assetVersionIds.

For example, this is a rbxassetid link that points to the justice decal by Roblox:


And this is its URL equivalent:

http and https[edit]

This points to the exact location of something on the internet. It only works on Roblox-approved sites and will raise an error if used otherwise.

The only known approved websites are those that fall under the domain.

Here is an example of finding an asset from gametest:

Referenced by