Luau’s round function is directly borrowed from C++'s math.h library. As for the implementations of Roblox API members, that’s a little difficult to get your hands on—the best you can get is the Luau source code
You’re implying it’s possible… So, how would I go about trying to see the code behind the button Intersect? I’m curious how it chooses the main part vs the other parts, bc I desperately need to add this functionality into my game. No urgency though. Thanks!
It’s possible through leaked source code and decompilation. I’m not sure where you can get your hands on leaked source code, but I know it exists. Decompiling the Roblox game engine is just too much effort for so little reward
The playergui freecam script is written in luau, they’re actual SCRIPTS. You can even remove them and replace those scripts with your own if you’d like.
These internal functions themselves is code usually borrowed from a library itself, or written in C.
C-Side code is the reason why some Roblox functions are really fast compared to others. For example if you were making radius detection, it’s no longer best to iterate in a I, v loop written in lua. Instead you use GetPartsBoundsInRadius (which is a C-side function), that runs with C code which is faster. I think GetPartsBounds has some sort of octree function built into it also.
If you wanna see the code behind a built-in function, you need access to the decompiled Roblox codebase.