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.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 ContentProvider.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
- (assetId)
- (assetId)
- (assetId)
- (animationId)
- (captureContentId)
- (contentId)
- (contentId)
- (contentId)
- (assetId)
- (contentId)
- (assetId)
- (assetId)
- (url)
- (url)
- (url)
- (url)
- (url)
- (meshId)
- (colormapAssetId)
- (heightmapAssetId)
- (heightmapAssetId)
- (heightmapAssetId, colormapAssetId)
- (meshId)
- (url)
- (assetId)
- (assetId)
- (contentId)
- (assetId)
- (modelId)
- (meshId, textureId)
- (assetId)
- (url)
- (textureId) (removed)
- (meshId) (removed)
- (removed)
- (url) (removed)
- (removed)
- (removed)
- (removed)
Removed API using Content
The following removed API used the Content data type before it was renamed to ContentId.
- (opaqueContent)
- (content)
- (content)
- (content)
- (content)
- (meshContent)
- (captureContent)
- (captureContent)
- (captureContent)
- (content)
- (content)
- (content)
- (removed)
- (removed)
- (textureId) (removed)
- (removed)
- (meshId) (removed)
- (removed)
- (removed)
- (removed)
- (removed)
- (removed)
- (textureId) (removed)
- (meshId) (removed)
- (textureId) (removed)
- (url) (removed)
- (url) (removed)
- (meshId) (removed)
- (removed)
- (removed)
- (heightmapAssetId) (removed)
- (removed)
- (removed)
- (removed)
- (heightmapAssetId, colormapAssetId) (removed)
- (removed)
- (url) (removed)
External links
- ContentId on the Roblox Creator Documentation
- Content Format Strings section of Asset Types on the Roblox Creator Documentation
| Basic Lua types | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Roblox types |
| ||||||||||||||||||||||||||
| API reference only | |||||||||||||||||||||||||||