Roblox Wiki
Roblox Wiki
Advertisement
Roblox Wiki
Stub
This article is a stub. You can help the Roblox Wiki by expanding it.

The ContentId data type (formerly Content) is a formatted string which is a link to a file, usually in form of an asset, and is used in properties that require a link to an asset, such as the Decal light iconDecal dark iconDecal.Texture property. In Properties, the engine rejects any string entered into a ContentId property that is not properly formatted.

Like ProtectedString, the data type itself is not accessible in Lua, since ContentId properties are treated as strings instead.

Valid protocols[]

The format for a ContentId string is "protocol://string", and the protocol is restricted to certain values. Anything not in this format or using an invalid protocol will result in a loading failure.

Protocol String Description Example
rbxasset A file path Fetches a file from Roblox's content files (stored on PC) rbxasset://textures/face.png
rbxassetid An existing asset ID Fetches an asset ID from the Roblox website. Must be approved. rbxassetid://607948062
rbxgameasset Folder/category + asset name Fetches a file uploaded through the game explorer in studio. rbxgameasset://Images/Potion
rbxhttp A path on the website Fetches content from the Roblox website. Shorthand for Light service iconDark service iconContentProvider.BaseUrl. rbxhttp://Thumbs/Avatar.ashx?x=100&y=100&format=png
rbxthumb Ordered parameters and values Fetches a thumbnail and supports retrying in case of failure. Order of params is enforced. rbxthumb://type=Asset&id=24813339&w=150&h=150
http / https URL Fetches content from a website. Only works on Roblox-approved sites and will fail otherwise. https://www.roblox.com/asset/?id=607948062

Referenced by[]


Removed API using Content[]

The following removed API used the Content data type before it was renamed to ContentId.


External links[]


Advertisement