AcediaDocumentation

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): string

Parameters

ParameterTypeDescription
pathstringPath relative to the Acedia workspace.
contentsstringBytes 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.

On this page