PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Content Data Types

Content Data Types

Jul 02 2018, 5:31 PM PST 2 min

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.

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

ContentFilterDiagram.png

How content is formatted

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.
(protocol)://(string)

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.

Protocols

rbxasset

This starts with Roblox’s content folder on the user’s computer.

Example:

rbxasset://textures/CoinIcon.png

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

C:\Users\<username>\AppData\Local\Roblox\Versions\<version>\content

rbxhttp://directory

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

For example:

rbxhttp://Thumbs/Avatar.ashx?x## 100&y100&format## png&usernameRoblox

Might expand to:

http://www.roblox.com/Thumbs/Avatar.ashx?x## 100&y100&format## png&usernameRoblox

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:

rbxassetid://29464013

And this is its URL equivalent:

http://www.roblox.com/asset/?id=29464013

http and https

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 roblox.com domain.

Here is an example of finding an asset from gametest:

http://gametest.roblox.com/Asset?id=12223885