Complete Lua type definitions for Polytoria game development with full IntelliSense support in Visual Studio Code.
This project is free and open source for anyone to use. I will keep updating it untill further notice.
Make sure to leave a star to this project 😅
- ✨ Full autocomplete for all Polytoria classes and methods
- 📚 Comprehensive documentation for all APIs
- 🎯 Type checking for function parameters and return values
- 🚀 Enhanced development experience
-
Lua Language Server extension for VSCode
-
Download the project ZIP file
-
Extract it to a permanent location on your computer
⚠️ Important: Do NOT place the folder in your Downloads directory to avoid accidental deletion
- Launch Visual Studio Code
- Go to
File→Open Folder... - Navigate to the extracted project folder
- Click Select Folder
- In the VSCode Explorer sidebar, open
.vscode/settings.json - Find line 3 which contains the workspace library path
- Replace the path with your lua-library directory
Images to help beginners:
Example configuration:
{
"Lua.workspace.library": [
"C:/path/to/your/polytoria-coding/lua-library" // Change this to the path of the lua-library folder inside of polytoria-coding
]
}- Save the
settings.jsonfile (Ctrl+S / Cmd+S) - Open any
.luafile while having the folder polytoria-coding open in vscode - Start typing
game.and verify that autocomplete suggestions appear
Once installed, you'll have full IntelliSense support for Polytoria development:
-- Autocomplete for game services
local env = game["Environment"]
-- Method signatures and documentation
local player = game["Players"].LocalPlayer
player:Kick("Reason")
-- Type definitions for all classes
local part = Instance.New("Part", env)
part.Color = Color.New(1, 0, 0)If a type ends with double underscores, it just indicates its an instance of that type. For example, Instance__ is an instance of the Instance type. This does not affect your code, this is just to prevent recommendations from showing, for example, ".New" on a Player (.New is only valid on the static Instance type, and not on an instance of Instance).
Note: Not every class has a double underscore type! So if a function wants you to pass a Part, you still should pass an instance (which should also have the Part type, because Part__ does not exist).
In general: Ignore the double underscores, they are just to provide better hints to the language server.
Since Lua is not a typed language, it is not possible to cast types within Lua. But you kinda need to! For example, Instance__:FindChild returns an Instance__, but you know it's a Part__. You can cast it by using the as annotation:
local part = myInstance:FindChild("MyPart") --[[@as Part]]- Verify the Lua path in
.vscode/settings.jsonis correct - Ensure the Lua extension by sumneko is installed and enabled
- Try reloading VSCode (
Ctrl+Shift+P→ "Developer: Reload Window")
- Check that the path doesn't contain spaces or special characters (wrap in quotes if it does)
- Try using forward slashes
/instead of backslashes\in the path
Contributions are welcome! If you find missing definitions or errors, please:
- Fork the repository
- Create a feature branch
- Submit a pull request with your changes
If you encounter any issues or have questions:
- Dm me on discord:
consuming_ - Check the Polytoria Documentation
Huge shoutout to GoldenretriverYT 🙏 Made with ❤️ for the Polytoria community !


