Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would i format %x to be a readable format for assetID's?

code example so not request:

local format = "%x"
local formatted = string.format(format, "7846242414") -- fake assetID btw

1 answer

✓ Accepted answer

Hey, this is pretty easy to do, all you need to do add is the "#" to the x.

This makes the formatting readable, for example you can do this on an audio assetID:

local Format = "%#x" -- turns the hex (%x) into a readable roblox format by making x = #x
local Formatted = string.format(Format, "152745539")
local AssetID = "rbxassetid://" .. Formatted

local Sound = Instance.new("Sound")
Sound.Playing = true
Sound.Looped = true
Sound.SoundId = AssetID
Sound.Parent = workspace

2 comments

0

I'll test this now, thanks.

0

worked, thanks again.

This discussion is preserved as it was. New answers, comments, and votes are closed.