getthreadcaps
Returns the current thread's 64-bit capability bitmask as a hex string.
Reads the 64-bit capability bitmask from the thread's Roblox context block beside its identity and returns it as a fixed-width hex string, formatted as 0x followed by 16 lowercase hex digits.
Returned as text rather than a number because the mask uses up to 62 bits, which does not round-trip through a Lua number (double).
getthreadcaps(): stringExample
local caps = getthreadcaps()
print(caps)
local function hasBit(caps, bit)
local word = tonumber(string.sub(caps, bit < 32 and -8 or 3, bit < 32 and -1 or 10), 16) or 0
return bit32.band(word, bit32.lshift(1, bit % 32)) ~= 0
endExample output
0x300000000000000bThe specific value depends on the identity under which the thread is running; the shape is always 0x plus 16 lowercase hex digits.
