writecustomasset
Writes a workspace file and returns its asset URI.
Writes the file the way writefile does, then answers with the asset URI getcustomasset would return for that path. Use a file format the receiving Roblox property supports.
writecustomasset(path: string, contents: string): stringParameters
| Parameter | Type | Description |
|---|---|---|
path | string | Path relative to the Acedia workspace. |
contents | string | Bytes to write. |
Example
local image = Instance.new("ImageLabel")
image.Image = writecustomasset("example.png", readfile("source.png"))Errors: An invalid path, a blocked extension, a failed write or a failed asset copy raises an error.
