For example, the code of Instance:Destroy()
or string.gsub()
.
I didn’t ask how to use these functions, instead, I asked how to get the code behind them.
You can’t its a internal function of the roblox engine lol.
You can take a peak under the hood in the Roblox Client Tracker when they make changes but you won’t find anything like that.
What’s your use case to begin with?
If you need the source code of standard libraries that aren’t Roblox-exclusive, you can take a look through the Lua C API (what they’re primarily based in) or the Luau language project files itself. If it’s methods on instances which are Roblox-exclusive, they’re baked into the engine and not exposed to developers. Most of them also cross the C boundary which is not really relevant for standard on-platform Roblox development.
I just want to know what they are doing. For example, there is a bug with SoundService:PlayLocalSound() that doesn’t respect SoundEffects, SoundGroup and properties of the sound. So I thought it was probably creating a new sound with the id of the given Sound instance, or just playing the sound without creating a Sound instance, and wanted to see how it works. It’s just out of curiosity, so it doesn’t really matter if it is not possible read the code.