Skip to content

Conversation

@NotBlackrus
Copy link

@NotBlackrus NotBlackrus commented Nov 15, 2025

Changed all C# mentions of arrays to be Lua-friendly site-wide

ex: before, it would mention arrays of instances as Instance[], but now it will mention them as {Instance}. This is so that lua programmers know what they're looking at, and so that we can fit multiple class names as needed.

-Edited Camera.md to change the "Freecam" typo to "FreeCam"
-Added warning about lua's single-thread nature in BaseScript.md, and how to work around it

Environment.md changes:

-Added links to nearly every reference of objects in the entire file
-Added optional parameter markers for CreateExplosion
-Modified CreateExplosion note to be more in depth and specific with wording
-Added optional parameter marker for OverlapBox and OverlapSphere
-Completely rewrote the Raycast and RaycastAll methods to be more comprehensive
-Remade RebuildNavMesh documentation 😭 🙏, please tell me I'm not the only one that laughed when I saw game["Workspace"]
-Added optional parameter marker for GetPointOnNavMesh
-Rewrote AutoGenerateNavMesh documentation to be more comprehensive
-Added more details to PartDestroyHeight's behavior with NPCs and Players

-Added extensive explanation as to how RayResult.Normal works in RayResult.md

-Added warning about GUI.Visible behavior in GUI.md

-Added warning about Tool-descendant scripts and their odd inability to run until the first Tool.Equipped event in Tool.md

merged with the latest pull request (all they did was organize the layout in creator-setup.md 😭)

Changed all C# mentions of arrays to be Lua-friendly **site-wide**
ex: before, it would mention arrays of instances as Instance[], but now it will mention them as {Instance}. This is so that lua programmers know what they're looking at, and so that we can fit multiple class names as needed.

Edited Camera.md to change the "Freecam" typo to "FreeCam"
Added warning about lua's single-thread nature in BaseScript.md, and how to work around it

Environment.md changes:
Added links to nearly every reference of objects in the entire file
Added optional parameter markers for CreateExplosion
Modified CreateExplosion note to be more in depth and specific with wording
Added optional parameter marker for OverlapBox and OverlapSphere
Completely rewrote the Raycast and RaycastAll methods to be more comprehensive
Remade RebuildNavMesh documentation 😭 🙏, please tell me I'm not the only one that laughed when I saw game["Workspace"]
Added optional parameter marker for GetPointOnNavMesh
Rewrote AutoGenerateNavMesh documentation to be more comprehensive
Added more details to PartDestroyHeight's behavior with NPCs and Players

Added extensive explanation as to how RayResult.Normal works in RayResult.md

Added warning about GUI.Visible behavior in GUI.md

Added warning about Tool-descendant scripts and their odd inability to run until the first Tool.Equipped event in Tool.md

merged with the latest pull request (all they did was organize the layout in creator-setup.md 😭)
@maji-git
Copy link

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

@NotBlackrus
Copy link
Author

NotBlackrus commented Nov 15, 2025

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

this is true, but for reasons we may or may not all know about, Lua programmers in Polytoria are predominantly familiar with curly bracket arrays, making it the most convenient of the two.
If this change were to impede certain site features I wouldn't mind reverting it, or if my profiling of the common Polytoria developer is wrong

@GoldenretriverYT
Copy link
Contributor

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

this is true, but for reasons we may or may not all know about, Lua programmers in Polytoria are predominantly familiar with curly bracket arrays, making it the most convenient of the two. If this change were to impede certain site features I wouldn't mind reverting it, or if my profiling of the common Polytoria developer is wrong

Ngl i would find {Instance} more confusing than Instance[]

@NotBlackrus
Copy link
Author

I feel like mentioning arrays as Instance[] is fine on its own. EmmyLua/LuaLS annotations also do this for arrays.

this is true, but for reasons we may or may not all know about, Lua programmers in Polytoria are predominantly familiar with curly bracket arrays, making it the most convenient of the two. If this change were to impede certain site features I wouldn't mind reverting it, or if my profiling of the common Polytoria developer is wrong

Ngl i would find {Instance} more confusing than Instance[]

How so? From what I understand of luajit and it's syntax, arrays are described with the curly brackets while you retrieve values from indexes with brackets much similarly to it's sibling, lua 5.1. {Instance} visually looks the most practical because of how it's an array {} of objects that inherit Instance.
I think it looks more confusing with Instance[], because as I described before, brackets are commonly used to access array elements. So it simply looks like an incomplete query into an array named Instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants