├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── man ├── README.md ├── branches.md ├── files.md ├── resources.md ├── stages.md ├── states.md ├── typedec.md └── writing.md └── src └── doc └── en ├── api ├── class │ ├── HttpService.md │ ├── Instance.md │ ├── PhysicsSettings.md │ ├── StarterGui.md │ ├── Studio.md │ └── StudioService.md ├── enum │ ├── EnviromentalPhysicsThrottle.md │ ├── HoverAnimateSpeed.md │ ├── InputType.md │ └── StudioStyleGuideColor.md └── type │ ├── Axes.md │ ├── BrickColor.md │ ├── Faces.md │ ├── PhysicalProperties.md │ ├── bool.md │ └── void.md └── article └── Intervals.md /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | This page provides information on contributing to the Roblox API Reference 3 | Documentation project. 4 | 5 | #### Ownership 6 | It's great if you've spent significant time and effort on a document, but this 7 | doesn't mean you "own" it. Documents belong to all contributors of the project, 8 | so expect content you've written to be revised without mercy. Take pride in the 9 | contribution, not the content. 10 | 11 | #### Source licensing 12 | The Roblox Wiki (defunct) [used the GFDL][GFDL] as its license. This is not 13 | compatible with the [CC-BY-SA license][license] used by this project, so content 14 | from the Wiki must be considered with caution. In addition, it is likely that a 15 | significant amount of the content on the [DevHub][DevHub] was migrated from the 16 | Wiki. Therefore, it is assumed that the DevHub is subject to the same license 17 | until proven otherwise. 18 | 19 | When writing content, these websites should be avoided as much as possible. 20 | However, they *can* be used to confirm the accuracy of content that has already 21 | been written. The idea is to avoid intentionally or unintentionally copying 22 | documentation with an incompatible license. 23 | 24 | [GFDL]: https://web.archive.org/web/20160304001309/http://wiki.roblox.com/index.php/Roblox_Wiki:General_disclaimer 25 | [license]: LICENSE 26 | [DevHub]: https://developer.roblox.com 27 | 28 | ## Submitting issues 29 | Issues usually fall into one of a number of types: 30 | 31 | - **enhancement**: Something could be improved. Feature requests. 32 | - **error**: Something is incorrect. Usually involves taking a direct action to 33 | solve the problem. 34 | - **question**: Something is unclear. Usually results in a clarification of the 35 | subject. 36 | 37 | Issues also usually have a broad subject: 38 | - **content**: Regarding the actual content of an API document. 39 | - **syntax**: Regarding spelling, grammar, and so on. Separate from content, 40 | because these are usually minor. 41 | - **meta**: Regarding the project itself. This can involve the manual, 42 | formatting that affects all API documents, and so on. 43 | 44 | Though not required, the submitter will benefit by focusing their issue on a 45 | type and subject as described above. 46 | 47 | Other statuses that may appear: 48 | - **duplicate**: The same issue was already submitted previously. 49 | - **needs info**: Not currently actionable; more information is needed from the 50 | submitter. 51 | - **invalid**: Closed due to being irrelevant to the project or otherwise 52 | unsuitable. 53 | - **aged**: Closed due to long period of inaction. Can be reopened if an action 54 | is taken since. 55 | - **grouped**: Closed due to containing multiple issues within a single 56 | submission. Each issue should be resubmitted individually. 57 | 58 | When submitting an issue regarding a specific document, the path to the document 59 | should be included in the title. For example: 60 | 61 | > ### [api/class/Instance] Incorrect description of ChildAdded 62 | 63 | ## Creating pull requests 64 | The submitter may also make pull requests to directly address an issue 65 | themselves. 66 | 67 | ### Submitting documents 68 | When submitting a pull request regarding a specific document, the path to the 69 | document should be included in the title. For example: 70 | 71 | > ### [api/class/Instance] Add example for ChildAdded 72 | 73 | A writer may submit a complete document by creating a pull request against the 74 | `master` branch. This pull request will be reviewed by a member of the project, 75 | who will check the content for accuracy, wording, and completeness. The reviewer 76 | may suggest improvements, or make edits against the pull request directly. The 77 | submitter should work with the reviewer to make the content pristine. The 78 | document will be merged once it meets standards. See the [stages](man/stages.md) 79 | page for more information on requirements. 80 | 81 | A writer may also submit partial documents, or drafts. Drafts live in branches 82 | in the repository. If a branch for a draft exists, then the writer may submit a 83 | pull request against that branch directly. It will be compared against the 84 | content that already exists in that branch. 85 | 86 | GitHub does not allow pull requests to be made against branches that do not 87 | exist. For this reason, the `draft` branch exists. Pull requests made against 88 | this branch indicate to reviewers that the submitted document is incomplete, and 89 | the repository does not yet have a branch for that document. After the document 90 | is reviewed and refined, the reviewer will create a new branch and redirect the 91 | pull request to it. 92 | 93 | Attempting to submit multiple documents within a single pull request is invalid. 94 | Such pull requests will be closed, and the writer should resubmit each document 95 | individually. 96 | 97 | See the [branches](man/branches.md) page for more information about branches in 98 | this repository. 99 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | 307 | including for purposes of Section 3(b); and 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public 411 | licenses. Notwithstanding, Creative Commons may elect to apply one of 412 | its public licenses to material it publishes and in those instances 413 | will be considered the “Licensor.” The text of the Creative Commons 414 | public licenses is dedicated to the public domain under the CC0 Public 415 | Domain Dedication. Except for the limited purpose of indicating that 416 | material is shared under a Creative Commons public license or as 417 | otherwise permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the 425 | public licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Roblox API Reference Documentation 2 | This project contains the source files for unofficial documentation of the 3 | [Roblox][roblox] Lua API. These documents may be referred to manually, or as a 4 | source for machine-generated documentation. The principal document format is 5 | [Markdown][markdown]. 6 | 7 | Documents are located within the `src` directory. The [Manual of Style][mos] 8 | details concepts and goals for the project, and guidelines for writing 9 | documentation. 10 | 11 | See the [Contributing][contrib] page for more information on contributing to the 12 | project. 13 | 14 | All documents within this repository, unless noted otherwise, are licensed to 15 | the Roblox API Reference Documentation contributors under the 16 | [CC-BY-SA-4.0][license] license. 17 | 18 | Documents have been authored using information from the following sources: 19 | 20 | - Original research 21 | - [DevHub](https://developer.roblox.com/) 22 | - [DevForum](https://devforum.roblox.com/) 23 | - Roblox wiki (defunct) 24 | - Roblox forums (defunct) 25 | 26 | *This project is not affiliated with [Roblox Corporation][roblox].* 27 | 28 | [roblox]: https://corp.roblox.com/ 29 | [markdown]: https://daringfireball.net/projects/markdown/ 30 | [license]: LICENSE 31 | [contrib]: CONTRIBUTING.md 32 | [mos]: man/README.md 33 | -------------------------------------------------------------------------------- /man/README.md: -------------------------------------------------------------------------------- 1 | # Manual of Style 2 | This project aims to provide documentation for the [Roblox][roblox] Lua 3 | application programming interface (API). This directory contains the **manual**, 4 | or documentation for the project itself. It introduces concepts, values, and 5 | goals for the project, and provides guidelines and workflow for writing API 6 | documents. 7 | 8 | [roblox]: https://corp.roblox.com/ 9 | 10 | ## Contents 11 | - [File structure](files.md): How project files are structured. 12 | - [Stages](stages.md): How work on documentation is motivated. 13 | - [States](states.md): Classification of document and entity progress. 14 | - [Branches](branches.md): How branches are used in this repository. 15 | - [Writing](writing.md): Guidelines for writing documents. 16 | - [Resources](resources.md): How to handle resource files. 17 | - [Type declarations](typedec.md): Format of type declarations in documents. 18 | - [Contributing](/CONTRIBUTING.md): Information about contributing to the 19 | project. 20 | 21 | ## Terminology 22 | This section defines several terms, which are used throughout the manual (but 23 | not necessarily throughout the API documentation). 24 | 25 | - An **entity** is a unit or piece of the API. For example, class, property, 26 | enum, or data type. 27 | - A **primary entity** is defined in relation to no other entities. 28 | - A **secondary entity** belongs to a primary entity; it can only be referred to 29 | in relation to that entity. 30 | - The **entity type** indicates the kind of entity. This is used to disambiguate 31 | the names of primary entities. For example, the API has a Platform *class*, as 32 | well as a Platform *enum*. 33 | 34 | Primary entities: 35 | 36 | Entity | Type | Examples 37 | -----------|-------|--------- 38 | Classes | class | `Instance`, `Workspace`, `Model`, `BasePart` 39 | Enums | enum | `NormalId`, `Material`, `KeyCode` 40 | Data Types | type | `int`, `string`, `Vector3`, `CFrame` 41 | 42 | Secondary entities: 43 | 44 | Entity | Primary type | Examples 45 | -----------|--------------|--------- 46 | Properties | class | `Instance.Name`, `BasePart.Position` 47 | Functions | class | `Humanoid.MoveTo`, `GuiObject.TweenPosition` 48 | Events | class | `Sound.Played`, `AnimationTrack.KeyframeReached` 49 | Callbacks | class | `BindableFunction.OnInvoke`, `MarketplaceService.ProcessReceipt` 50 | Enum items | enum | `NormalId.Front`, `Material.Water`. 51 | 52 | - A **document** is a file that describes entities. A single document describes 53 | a single primary entity, along with all of its secondary entities. 54 | - An entity's or document's **state** describes how complete it is. See 55 | [states](states.md) for more information. 56 | - A **stage** refers to the current motivation of a document, or for the project 57 | overall. See [stages](stages.md) for more information. 58 | -------------------------------------------------------------------------------- /man/branches.md: -------------------------------------------------------------------------------- 1 | # Branches 2 | This project makes heavy use of Git **branches**. Branches in the project 3 | repository may only contain documents of certain states: 4 | 5 | Branch | Allowed states 6 | ----------|--------------- 7 | `master` | `perfect`, `spotless`, `missing` 8 | (draft) | `perfect`, `spotless`, `draft`, `missing` 9 | (fork/PR) | `perfect`, `spotless`, `draft`, `missing` 10 | 11 | See the [states](states.md) page for more information about states. 12 | 13 | The `master` branch contains current, unblemished documentation. That is, it may 14 | only contain `perfect`, `spotless`, and `missing` documents, and cannot contain 15 | `draft` documents. 16 | 17 | A `draft` document can exist in the repository, but must be held within its own 18 | "draft" branch. One branch per document, one document per branch. The name of 19 | such a branch must be the file path to the document, minus the file extension. 20 | Non-English documents must include the language directory. 21 | 22 | For example, a draft of the `Instance.md` document, describing the Instance 23 | class, would live in the `api/class/Instance` branch. The Spanish version would 24 | live in the `es/api/class/Instance` branch. 25 | 26 | This naming scheme applies to draft branches in the project repository. Branches 27 | within forks or pull requests are local to that repository, and so do not have 28 | to follow this scheme. 29 | 30 | Draft branches are ephemeral. Once the document is reviewed and promoted to 31 | `spotless` or `perfect`, the commits are rebased and merged into `master`, and 32 | the draft branch is deleted. 33 | 34 | The literal `draft` branch is an special empty branch that writers may submit 35 | pull requests against to indicate that they wish to create a new branch 36 | containing drafted content. Such pull requests are later redirected to the 37 | correct branch by a member of the project. 38 | -------------------------------------------------------------------------------- /man/files.md: -------------------------------------------------------------------------------- 1 | # File structure 2 | This page describes how the project repository is structured. 3 | 4 | All documents and related files are located under the `src/` directory. 5 | 6 |
7 | 8 |
src/
9 |
10 | 11 | The root of the document file tree. 12 | 13 |
14 | 15 |
src/res/
16 |
17 | 18 | Global resources; embedded images, video, audio, attachments, etc. May contain 19 | subdirectories. Files are visible to all documents. 20 | 21 |
22 | 23 |
src/doc/
24 |
25 | 26 | Root location of documents. 27 |
28 | 29 |
src/doc/$LANG/
30 |
31 | 32 | Documents of a specific language. `$LANG` is an IETF language tag, indicating 33 | the language of the contained documents. For example, `en` represents English. 34 | This directory only contains directories. 35 | 36 |
37 | 38 |
src/doc/$LANG/$CATEGORY/
39 |
40 | 41 | Documents of a particular category. 42 | 43 | Any descendant document of the form `$NAME.md` may have an optional sibling 44 | directory called `$NAME` which contains resource files visible only to that 45 | specific document. 46 | 47 |
48 | 49 |
src/doc/$LANG/api/
50 |
51 | 52 | Documents of the API category. These are structured to fit with generated API 53 | pages. 54 | 55 |
56 | 57 |
src/doc/$LANG/api/$TYPE/
58 |
59 | 60 | API entities namespaced by type. These correspond to the `class`, `enum` and 61 | `type` entity types. 62 | 63 |
64 | 65 |
src/doc/$LANG/api/$TYPE/$PRIMARY.md
66 |
67 | 68 | The combination of `$TYPE/$PRIMARY.md` indicates a file that documents the 69 | referred API entity. For example, `class/Workspace.md` documents the *Workspace* 70 | *class*. 71 | 72 |
73 | 74 |
src/doc/$LANG/article/
75 |
76 | 77 | Documents of the Article category. These are discussion-oriented, and include 78 | patterns and concepts of entities, and the API itself. 79 | 80 |
81 | 82 |
83 | 84 | Here are some examples: 85 | 86 | - `src/doc/en/api/class/Workspace.md`: Document for the Workspace class in English. 87 | - `src/doc/es/api/enum/NormalId.md`: Document for the NormalId enum in Spanish. 88 | - `src/doc/de/api/type/Vector3.md`: Document for the Vector3 type in German. 89 | - `src/doc/de/api/type/Vector3/example.png`: Resource visible only to `Vector3.md`. 90 | 91 | ### File types 92 | Documents have the `.md` file extension, indicating a Markdown file. 93 | 94 | Resource file types include anything that can be referred by or embedded into an 95 | HTML file. 96 | -------------------------------------------------------------------------------- /man/resources.md: -------------------------------------------------------------------------------- 1 | # Resources 2 | This page describes the production, formatting, and handling of resources. 3 | 4 | Plan ahead. Deliberate the content before committing to creating it. 5 | 6 | **Do everything possible to reduce the file size.** Reduce the duration and 7 | dimensions. Optimize. Play with encoding settings. Avoid files over 1MB. 8 | 9 | The dimensions of an image or video should only be as large as needed for the 10 | sake of clarity. 11 | 12 | Audio and video should have durations that are only as long as needed to get the 13 | point across. Video used purely for visual demonstration must not have an audio 14 | track. 15 | 16 | Visual media should avoid text for the purpose of explanation. Likewise, audio 17 | should avoid spoken words for the same reason. If media requires an explanation, 18 | write it in the document near the media. 19 | 20 | ## Images 21 | Images must be static, and encoded as either PNG or JPEG. **GIFs are absolutely 22 | forbidden.** 23 | 24 | Use PNG for flat images with less colors. Use JPG for noisy images with many 25 | colors. When in doubt, select the smaller file size. 26 | 27 | ## Video 28 | Video must be encoded as MPEG-4/H.264. Audio within a video must be encoded as 29 | MP3. 30 | 31 | Markdown does not support video elements, so they must be inlined via HTML. 32 | Preloading should be completely disabled. **Videos must never auto-play.** 33 | 34 | ## Audio 35 | Audio must be encoded as MP3. 36 | 37 | Markdown does not support audio elements, so they must be inlined via HTML. 38 | Preloading should be completely disabled. **Audio must never auto-play.** 39 | 40 | ## Attachments 41 | Attachments are usually in the form of Roblox place or model files. These are 42 | generally reserved for complex examples. 43 | -------------------------------------------------------------------------------- /man/stages.md: -------------------------------------------------------------------------------- 1 | # Stages 2 | Due to the vast size of the Roblox Lua API, work is divided into a number of 3 | **stages**. Stages apply to each document individually. For a document to move 4 | on to the next stage, each entity within the document must satisfy the 5 | **conditions** of the current stage. A document containing entities that do not 6 | yet satisfy conditions of the document's current stage is referred to as a 7 | **partial** document. See the [branches](branches.md) document for information 8 | about how partial documents are managed. 9 | 10 | Each stage also has a **life cycle**, which describes generally how content 11 | should be produced and submitted. 12 | 13 | Stages also apply to the entire project itself, which gives it focus overall. 14 | Once a particular document satisfies the conditions of the project's current 15 | stage, rather than moving on to the next stage for the document, the writer 16 | should begin focusing on other documents. When most or all documents satisfy the 17 | current stage, the project can move on to the next stage. 18 | 19 | *The project is currently in **Stage 1: Words*** 20 | 21 | ## Stage 1: Words 22 | The purpose of this stage is to provide the meat of the reference. Entities must 23 | be described. Lots of words must be written. Descriptions of behaviors must be 24 | verified for accuracy. 25 | 26 | Occasionally, media works better than words. If it takes significantly more 27 | effort to write a description than it does to take a screenshot, it's okay to 28 | just take a screenshot. 29 | 30 | All entities, except for enum items, must have a summary and detailed 31 | description (Summary and Details sections). However, if an entity is already 32 | completely described by the summary, and further details would just be 33 | redundant, then the entity is exempt from having a Details section. 34 | 35 | Because enum items can be either numerous or lacking significant information, 36 | they may be exempt from having a summary or details. Even so, enum items that 37 | need them should have them. 38 | 39 | Here are some examples of enums to get an idea of whether an enum item should 40 | have a description: 41 | 42 | - **KeyCode**: has hundreds of items, all of which can be described at once in 43 | the details of the enum itself. 44 | - No Summary; no Details. 45 | - **NormalId**: has relatively few items, but all of them can still be described 46 | at once in the enum details. 47 | - No Summary; no Details. 48 | - **StudioStyleGuideColor**: has numerous items, each worthy of having at least 49 | a summary, but any more than that would be excessive. 50 | - Has Summary; no Details. 51 | - **EasingStyle**: items have distinct behaviors, each of which could be 52 | described in detail. 53 | - Has Summary and Details 54 | 55 | If an enum item does have Details, then it must also have a Summary. 56 | 57 | **Conditions**: All entities within a document must have a summary and a 58 | detailed description as appropriate for the entity. Behaviors must be verified 59 | and described accurately. 60 | 61 | **Life cycle**: 62 | 1. Make. Write words. Describe the behavior of entities. Verify the correctness 63 | of these descriptions. 64 | 2. Refine. Submit the content for review. Allow others to verify correctness, 65 | improve wording, and so on. Refine the content until it is pristine. 66 | 3. Merge. Deploy the content to the website. 67 | 68 | ## Stage 2: Garnish 69 | The purpose of this stage is to enhance descriptions with images, video, audio, 70 | and so on, as needed. Most entities will not require media, and a lot of media 71 | will end up being more appropriate as examples, so this stage should be a lot 72 | shorter than others. 73 | 74 | **Conditions**: All entities within a document must be evaluated for the 75 | inclusion of media. For entities deemed appropriate, media is produced and 76 | included in the document. 77 | 78 | **Life cycle**: 79 | 1. Deliberate. For large media, submit a description of the content before 80 | producing it. Allow others to share their input. (i.e. Don't spend hours 81 | producing a video only to have it rejected.) 82 | 2. Produce. Create the content. Take a screenshot. Shoot a video. Record audio. 83 | 3. Refine. Submit a rough cut for review. Allow others to make suggestions on 84 | details. Refine until pristine. Render the final cut. 85 | 4. Merge. Deploy the content to the website. 86 | 87 | ## Stage 3: Examples 88 | The purpose of this stage is to fill in the final section of each item: 89 | Examples. 90 | 91 | **Conditions**: All entities with a document must have at least one example 92 | which satisfies the requirements defined in the [guidelines](GUIDELINES.md). 93 | 94 | **Life cycle**: 95 | 1. Make. Write code. Take screenshots. Create attachments. For large media, 96 | follow the Stage 2 life cycle. 97 | 2. Refine. Submit the content for review. Allow others to verify correctness, 98 | improve wording, and so on. Refine the content until it is pristine. 99 | 3. Merge. Deploy the content to the website. 100 | 101 | ## Future Stages: Expansion 102 | *The other aspects of documentation* 103 | 104 | This stage addresses the fact that a reference is only one aspect of a complete 105 | documentation suite: 106 | 107 | - Reference: information-oriented 108 | - **Tutorials**: learning-oriented 109 | - **Guides**: problem-oriented 110 | - **Discussions**: understanding-oriented 111 | 112 | The planning of this stage is currently incomplete. 113 | -------------------------------------------------------------------------------- /man/states.md: -------------------------------------------------------------------------------- 1 | # States 2 | A document describes a primary entity, as well as a number of secondary 3 | entities. Each entity within a document has one of the following **states** of 4 | completeness: 5 | 6 | - `absent`: The entity has no presence within the document. The primary entity 7 | has this state when the document only contains the section for secondary 8 | entities (the *Members* section). Likewise, secondary entities are still 9 | considered absent if they have a heading, but the section is otherwise empty. 10 | - `dirty`: The entity has a description, but the content is incomplete or 11 | unverified according to the document's current [stage](stages.md). 12 | - `pristine`: The description of the entity is complete and verified according 13 | to the document's current stage. 14 | 15 | Each document also has its own state: 16 | 17 | - `missing`: There exists a primary entity, but the corresponding document file 18 | is not present. 19 | - `draft`: The document file exists, but contains one or more `dirty` entities. 20 | - `spotless`: The document contains no `dirty` entities. 21 | - `perfect`: The document only contains `pristine` entities. 22 | 23 | Note that `draft` and `spotless` documents may contain `absent` entities. That 24 | is, a document does not need to contain every entity in order to be considered 25 | `draft` or `spotless`. 26 | 27 | States are assigned in relation to the API. As long as a document has a 28 | corresponding entity, it "exists" even if it is not present in the repository. 29 | This is the meaning of the `missing` state. 30 | 31 | Because of periodic modifications to the API, document states can switch 32 | passively, even if the content of the document does not change. For example, 33 | when an primary entity receives an additional secondary entity (i.e. updated 34 | API), the `perfect` document corresponding to that entity will passively 35 | downgrade to `spotless`. This is due to the additional secondary entity having a 36 | state of `absent`. 37 | 38 | Branches in the project repository may only contain documents of certain states. 39 | See the [branches](branches.md) page for more information. 40 | -------------------------------------------------------------------------------- /man/typedec.md: -------------------------------------------------------------------------------- 1 | # Type declarations 2 | This page describes the syntax of a Lua type declaration for use in documents. 3 | 4 | Sometimes, a document must provide its own description of a type. For 5 | consistency, this description has a particular format, which is specified by 6 | this page. The format is designed to be intuitive; a reader does not have to 7 | view this page in order to grasp how the type is structured. 8 | 9 | ## Declaration order 10 | Type declarations have a left-to-right (L2R) syntax, where the type is defined 11 | *after* the name, rather than before. This deviates from formats used by other 12 | documentation, which use a C-like syntax. 13 | 14 | To get an idea of the difference, here is a comparison between C and TypeScript: 15 | 16 | ```c 17 | // C syntax 18 | int name = 42; 19 | ``` 20 | 21 | ```typescript 22 | // TypeScript syntax 23 | let name: number = 42; 24 | ``` 25 | 26 | Most modern languages have a L2R syntax, which was determined to be more 27 | beneficial than C. The [Go's Declaration Syntax][blogpost] blog post has more 28 | information. 29 | 30 | [blogpost]: https://blog.golang.org/gos-declaration-syntax 31 | 32 | ## Syntax 33 | A declaration maps a name to a type. Generally, a declaration has the form: 34 | 35 | Name: Type 36 | 37 | Where `Name` is the name of the declaration, and `Type` is the value type. 38 | 39 | The name may have a qualifier, separated by the dot (`.`) character. Method 40 | declarations should use a colon (`:`) instead. 41 | 42 | math.huge: number 43 | Instance:GetChildren(): Objects 44 | 45 | For API declarations, a type must be the name of a type that exists in the API. 46 | Pure-Lua declarations should use the types that exist in Lua. 47 | 48 | position: Vector3 49 | math.pi: number 50 | 51 | A particular class of the Instance type can be indicated with the `Class.` 52 | prefix. An item of a particular enum can be indicated with the `Enum.` prefix. 53 | 54 | part: Class.BasePart 55 | surface: Enum.NormalId 56 | 57 | ### Functions 58 | Function types, which consist of parameters and return values, have their own 59 | syntax: 60 | 61 | Name(Parameters): Returns 62 | 63 | Where `Name` is the name of the function, `Parameters` lists each parameter 64 | passed to the function, and `Returns` lists values returned by the function. 65 | 66 | #### Parameters 67 | Parameters are separated by commas (`,`). Each parameter is a name paired with a 68 | type. 69 | 70 | CFrame.new(position: Vector3, lookAt: Vector3) 71 | 72 | A parameter may be optional. This is indicated by `?` after the type. 73 | 74 | table.insert(list: table, position: int?, value: Variant) 75 | 76 | A parameter may have a default value indicated after type with `=` followed by 77 | text describing the value. 78 | 79 | FindFirstChild(name: string, recursive: bool = false) 80 | 81 | The last parameter may be variable, indicated by `...` before the type. This 82 | means any number of values of the type. 83 | 84 | coroutine.resume(co: thread, args: ...Variant) 85 | 86 | #### Returns 87 | Returns have a similar syntax to parameters, where each value is a name paired 88 | with a type: 89 | 90 | ToEulerAnglesXYZ(): (x: float, y: float, z: float) 91 | 92 | There are also several abbreviations. Return values can be unnamed: 93 | 94 | ToAxisAngle(): (Vector3, float) 95 | 96 | Parentheses may be omitted for a single, unnamed value: 97 | 98 | GetFullName(): string 99 | 100 | Return values may also be variable: 101 | 102 | string.byte(s: string, i: number?, j: number?): ...number 103 | -------------------------------------------------------------------------------- /man/writing.md: -------------------------------------------------------------------------------- 1 | # Writing documents 2 | This page provides a guideline for writing and formatting documents. 3 | 4 | ## Prerequisites 5 | - Writers should be fluent in the language in which they are writing, and should 6 | have at least an intuitive understanding of the language. 7 | - Writers should be at least moderately familiar with a text editor (opposed to 8 | a word processor). 9 | - API documentation is written primarily in [Markdown][markdown], of which 10 | writers should have at least moderate knowledge. 11 | - Writers will benefit from having an unreasonable desire for correctness. 12 | 13 | [markdown]: https://daringfireball.net/projects/markdown/ 14 | 15 | ## Languages 16 | Currently, documentation is available in English only, and other languages are 17 | explicitly not provided. This restriction may be relaxed once a majority of 18 | existing documentation can be considered "complete", as this provides a 19 | sufficient reference. Consider the English version a "baseline implementation". 20 | 21 | ## Formatting 22 | For writing and editing documents, a text editor that supports Markdown is 23 | recommended. A monospace font is recommended. 24 | 25 | In general, the plain text itself should be readable and presentable, as though 26 | it were a final rendering of the document. For this reason, simple text and 27 | formatting should be strived for. 28 | 29 | ### Syntax 30 | Documents are formatted with [Markdown][markdown]. In cases where multiple 31 | styles are available, the following styles are preferred: 32 | 33 | - `*text*` for italic text. 34 | - `**text**` for bold text. 35 | - `## Name` for headings (ATX-style). In particular, setext-style headings 36 | should be avoided. 37 | - `-` for unordered lists. 38 | - `1.` for ordered lists. 39 | - `----` for horizontal rules. 40 | 41 | Several extensions to regular Markdown are allowed: 42 | 43 | - `` ``` `` for fenced code blocks. Directly after the first set of backticks, a 44 | language may be specified for syntax highlighting (e.g. `` ```lua``). 45 | - Simple tables may be created with the following format: 46 | 47 | ```markdown 48 | column 1 | column 2 | column 3 49 | ---------|----------|--------- 50 | cell 1 | cell 2 | cell 3 51 | cell 4 | cell 5 | cell 6 52 | ``` 53 | 54 | column 1 | column 2 | column 3 55 | ---------|----------|--------- 56 | cell 1 | cell 2 | cell 3 57 | cell 4 | cell 5 | cell 6 58 | 59 | - The `## Heading {#heading-id}` syntax may be used to specify heading 60 | identifiers explicitly. Generally, this syntax should be avoided, but may be 61 | necessary for certain unusual formats. The [Headings](#user-content-headings) 62 | section describes how identifers are generated automatically. 63 | - Markdown should be used when possible, but HTML elements may be used directly, 64 | if needed. 65 | - Generally, text should be wrapped to 80 characters. Exceptions include HTML 66 | elements, or lines containing inline links with long URLs (in this case, it 67 | may be better to use a reference-style link). 68 | - Tabs must be used for indentation. There is no required tab length (although 4 69 | is recommended), so text alignment involving tabs must be avoided. 70 | - Trailing whitespace (whitespace at the end of lines) must not be present 71 | within documents. 72 | - Newlines must be in UNIX format (`\n` rather than `\r\n`). 73 | - A document must have one trailing newline at the end of the file. 74 | 75 | Review your text editor settings or extensions for options to enforce these 76 | rules. 77 | 78 | ### Links 79 | In order to decouple documents from a particular rendering, several URI schemes 80 | are defined for referring to other documents or resources. The non-scheme 81 | portion of the URI is a path that should be URL-escaped if needed. A URI may 82 | also have a fragment (starting after `#`) that indicates an identifier with the 83 | section pointed to by the path. 84 | 85 |
86 | 87 |
res:$PATH
88 |
89 | 90 | Refers to a file located in the resource directory. `$PATH` is a relative file 91 | path (e.g. `image.png`). 92 | 93 |
94 | 95 |
class:$CLASS
96 |
97 | 98 | Refers to a class document. `$CLASS` is the name of a class entity. 99 | 100 |
101 | 102 |
class:$CLASS/$MEMBER
103 |
104 | 105 | Refers to a member within a class document. `$CLASS` is the name of a class 106 | entity. `$MEMBER` is the name of a member entity within the class. 107 | 108 |
109 | 110 |
enum:$ENUM
111 |
112 | 113 | Refers to an enum document. `$ENUM` is the name of an enum entity. 114 | 115 |
116 | 117 |
enum:$ENUM/$MEMBER
118 |
119 | 120 | Refers to a member (enum item) within an enum document. `$ENUM` is the name of 121 | an enum entity. `$MEMBER` is the name of an enum item entity within the enum. 122 | 123 |
124 | 125 |
type:$TYPE
126 |
127 | 128 | Refers to a data type document. `$TYPE` is the name of a type entity. 129 | 130 |
131 | 132 |
member:$MEMBER
133 |
134 | 135 | Refers to a member within the current document. `$MEMBER` is the name of a 136 | secondary entity within the primary entity of the current document. 137 | 138 |
139 | 140 |
article:$NAME
141 |
142 | 143 | Refers to an article document. `$NAME` is the name of the article. 144 | 145 |
146 | 147 |
148 | 149 | The usual `http` URL scheme is allowed for external references (note that 150 | `https` is preferred, when available). 151 | 152 | If an entity name is too unwieldy for linking to within a document, then 153 | reference links may be used. The reference should be placed at the top of the 154 | section of the referred entity. 155 | 156 | For example: 157 | ```markdown 158 | ## Changed 159 | A link to [GetPropertyChangedSignal][GPCS]. 160 | 161 | ## GetPropertyChangedSignal 162 | [GPCS]: member:GetPropertyChangedSignal 163 | 164 | Description of GetPropertyChangedSignal... 165 | ``` 166 | 167 | More generally, a local reference (within the same document) should be placed at 168 | the top of the referred section. 169 | 170 | External references are placed based on where they're used. If such a reference 171 | is used throughout the entire document, then it should be placed at the bottom 172 | of the document. If it is used only within a single section, then it may be 173 | placed at the bottom of that section. 174 | 175 | Excessive linking should be avoided. If an entity is referred to multiple times, 176 | then only first reference needs to be linked. On the other hand, sparse linking 177 | should also be avoided. 178 | 179 | To decide whether a reference should be linked, consider how the reader will 180 | view the content. That is, if a reader can jump directly to a particular 181 | section, then the first occurrence of the reference, in relation to that 182 | section, should be linked. This is because the reader will have skipped over any 183 | previous content, and so will have missed a previous link of that reference. 184 | 185 | For example: 186 | 187 | ```markdown 188 | ## ChildAdded 189 | This section refers to [Parent](member:Parent). A second reference to Parent is 190 | made, but it is not linked. 191 | 192 | ## ChildRemoving 193 | This section also refers to [Parent](member:Parent). It is also linked despite 194 | being the third reference in this document, because a reader is able to jump 195 | directly to this section. 196 | ``` 197 | 198 | Generally, treat *only* the following sections as if they can be jumped to 199 | directly: 200 | 201 | - The Summary section of a primary entity. 202 | - The Details section of a primary entity. 203 | - The Examples section of a primary entity. 204 | - The section of a secondary entity. 205 | 206 | This rule is not absolute. It may be worth linking a reference if the section is 207 | long and detailed enough to have subsections, or if the subject has changed and 208 | the reference hasn't appeared recently. 209 | 210 | ### Headings 211 | Headings generated by a document can be linked to. The identifier is derived 212 | from the heading name as follows: 213 | - Characters that aren't a letter or digit are converted to dashes (`-`). 214 | - Dashes are collapsed. 215 | - ID is converted to lowercase. 216 | - ID is prefixed with `doc-`. Includes identifiers defined explicitly. 217 | - Multiple occurrences of an ID are suffixed with `-N`, where in `N` is a number 218 | indicating the Nth occurrence of the ID (the first ID does not have the 219 | suffix). 220 | 221 | For example, to link to the first "Foo Bar" heading: 222 | 223 | [Foo Bar](#doc-foo-bar) 224 | 225 | The second "Foo Bar" heading: 226 | 227 | [Foo Bar](#doc-foo-bar-2) 228 | 229 | When creating new headings, other occurrences of headings with the same name in 230 | the document should be considered, as well as links to those headings; the 231 | heading number within a link may have to be adjusted. 232 | 233 | ### Member parameters 234 | Any time a member parameter is referred to, *italics* must be used. To avoid 235 | confusion, italics should be used *only* for parameters. The capitalization of 236 | the parameter must be as given by the API, even at the start of sentences. 237 | 238 | ```markdown 239 | ## FindFirstChild 240 | *name* matches the Name of the child to be found. *recursive* expands the search 241 | to all descendants. 242 | ``` 243 | 244 | Within a member section, a parameter given by name refers to a parameter of the 245 | current member. If a parameter on another member needs to be referred to, use 246 | language that links it to the referred member. e.g. rather than just "*name*", 247 | use "the *name* argument of FindFirstChild". 248 | 249 | ## Sections 250 | Regardless of file type, all documents have their own structure. In general, a 251 | document consists of **sections**, which in turn may contain their own 252 | subsections. A **top-level** section is at the root of a document, and has no 253 | parent section. 254 | 255 | For Markdown, headings are used to delimit sections. 256 | 257 | Every entity document should strive to have the following sections, in order: 258 | 259 | - Summary 260 | - Details 261 | - Examples 262 | 263 | ### Summary 264 | The Summary top-level section contains a short description of the entity. The 265 | very first sentence should provide an adequate summary on its own, as it may be 266 | extracted and displayed in isolation. 267 | 268 | The summary may contain more than one sentence, or even multiple paragraphs, but 269 | it should only provide a quick overview of the entity. 270 | 271 | The Summary heading may be omitted; when a section named "Summary" cannot be 272 | found, the "orphan" section is used instead. An orphan section is the content 273 | located after the start of the section, and before the start of the first 274 | subsection. For example: 275 | 276 | ```markdown 277 | # Entity 278 | This content is treated as the summary. 279 | 280 | ## Details 281 | This content is treated as the details. 282 | ``` 283 | 284 | This is equivalent to: 285 | 286 | ```markdown 287 | # Entity 288 | 289 | ## Summary 290 | This content is treated as the summary. 291 | 292 | ## Details 293 | This content is treated as the details. 294 | ``` 295 | 296 | For the top-level summary, retaining the summary heading is preferred. For 297 | subsection summaries, the heading should be omitted. 298 | 299 | ### Details 300 | The Details top-level section provides absolutely all information about the 301 | entity. 302 | 303 | Information should never be removed. If the entity changes, the change should be 304 | documented. The main body should contain the current behavior, while previous 305 | behavior is documented elsewhere. 306 | 307 | Common subsection may include: 308 | 309 | - **Bugs**: Definite problems with the entity, to the degree that they are 310 | likely to be fixed in the future. 311 | - **Changes**: Changes to the entity. Previous behavior, along with the date or 312 | version of change. 313 | 314 | ### Examples 315 | The Examples top-level section contains usable examples of the entity, usually 316 | in the form of code snippets. 317 | 318 | An example should strive to be useful; it should be tailored specifically to the 319 | entity, demonstrating its capabilities. Ideally, it should not be possible to 320 | just swap out the entity with another. 321 | 322 | An example should be stand-alone; it should be possible to copy the example and 323 | run it in the Studio's command bar, or within a script. For complex examples 324 | were this isn't possible, prerequisites, instructions, or attachments should be 325 | provided. 326 | 327 | ### Members 328 | Depending on the type, a primary entity may have a fourth top-level section, 329 | called "Members". This contains documentation for each secondary entity 330 | belonging to the primary entity. 331 | 332 | Each direct subsection of Members corresponds to a secondary entity. The name of 333 | the section is the name of the entity. Subsections of this section are the usual 334 | Summary, Details, and Examples, as described above. 335 | 336 | Direct subsections of the Members section should be ordered by name. 337 | 338 | ```markdown 339 | # Members 340 | ## ChildAdded 341 | Summary of ChildAdded. 342 | 343 | ### Details 344 | Details of ChildAdded. 345 | 346 | ## ChildRemoved 347 | Summary of ChildRemoved. 348 | 349 | ### Details 350 | Details of ChildRemoved. 351 | ``` 352 | 353 | ### Struct data types 354 | Data types like `Vector3` and `CFrame` are **struct** types. Documents 355 | describing struct types have several additional sections. Every such document 356 | should strive to have the following sections, in order: 357 | 358 | - Summary 359 | - Details 360 | - **Constructors** 361 | - **Fields** 362 | - **Methods** 363 | - **Operators** 364 | - Examples 365 | 366 | Each additional section lists the components of the data type. Subsections 367 | describe a single component, and have a particular format. The heading name is a 368 | **type declaration**. The [Type declarations](typedec.md) page describes how 369 | type declarations are formatted. 370 | 371 | ```markdown 372 | ## `Lerp(goal: CFrame, alpha: number): CFrame` 373 | ``` 374 | 375 | Because of the unusual naming scheme, such headings are parsed in a particular 376 | way to generate consistent identifiers. For an identifier to be properly 377 | generated, the syntax of the heading must be correct, and the heading must be 378 | under the proper section. 379 | 380 | Subsections of a component section are the usual Summary, Details, and Examples, 381 | as described previously. 382 | 383 | #### Constructors 384 | The Constructors top-level section lists the type's constructor functions. 385 | 386 | Each function name must be described with the name of the type. That is, 387 | `CFrame.new()` instead of just `new()`. 388 | 389 | If a constructor returns a value of the current type, then the return type may 390 | be omitted in the declaration (`CFrame.new()` instead of `CFrame.new(): 391 | CFrame`). 392 | 393 | The identifier of a heading begins with `ctor-` followed by the case-sensitive 394 | name of the constructor. When a constructor has multiple definitions, the names 395 | of each argument are also appended. 396 | 397 | ```markdown 398 | # Constructors 399 | ## `CFrame.new()` 400 | ## `CFrame.new(position: Vector3)` 401 | ## `CFrame.new(position: Vector3, lookAt: Vector3)` 402 | ## `CFrame.new(x: number, y: number, z: number)` 403 | ## `CFrame.Angles(rx: number, ry: number, rz: number)` 404 | ``` 405 | 406 | In a final rendering, these would produce the following identifiers: 407 | - `doc-constructors` 408 | - `doc-ctor-new` 409 | - `doc-ctor-new-position` 410 | - `doc-ctor-new-position-lookAt` 411 | - `doc-ctor-new-x-y-z` 412 | - `doc-ctor-new-rx-ry-rz` 413 | - `doc-ctor-Angles` 414 | 415 | #### Fields 416 | The Fields top-level section lists the fields of the type. 417 | 418 | The identifier of a heading begins with `field-` followed by the case-sensitive 419 | name of the field. 420 | 421 | ```markdown 422 | # Fields 423 | ## `X: number` 424 | ## `Y: number` 425 | ## `Z: number` 426 | ## `Position: Vector3` 427 | ## `LookVector: Vector3` 428 | ``` 429 | 430 | In a final rendering, these would produce the following identifiers: 431 | - `doc-fields` 432 | - `doc-field-X` 433 | - `doc-field-Y` 434 | - `doc-field-Z` 435 | - `doc-field-Position` 436 | - `doc-field-LookVector` 437 | 438 | #### Methods 439 | The Methods top-level section lists the methods of the type. 440 | 441 | The identifier of a heading begins with `method-` followed by the case-sensitive 442 | name of the method. 443 | 444 | ```markdown 445 | # Methods 446 | ## `Inverse(): CFrame` 447 | ## `Lerp(goal: CFrame, alpha: number): CFrame` 448 | ## `ToWorldSpace(cf: CFrame): CFrame` 449 | ## `ToObjectSpace(cf: CFrame): CFrame` 450 | ``` 451 | 452 | In a final rendering, these would produce the following identifiers: 453 | - `doc-methods` 454 | - `doc-method-Inverse` 455 | - `doc-method-Lerp` 456 | - `doc-method-ToWorldSpace` 457 | - `doc-method-ToObjectSpace` 458 | 459 | #### Operators 460 | The Operators top-level section lists the operators of the type. 461 | 462 | Each operator has its own syntax. Generally, the name of the type is used with 463 | the operator, along with any other operands, if applicable, followed by the type 464 | of the resulting value. In particular, the syntax of the `call` operator is the 465 | same as the method syntax. 466 | 467 | The identifier of a heading begins with `op-` followed by the metamethod name, 468 | then the other operand, if applicable. 469 | 470 | ```markdown 471 | Identifiers on binary operators use the second operand. 472 | ## `Type + Operand : Result` 473 | ## `Type - Operand : Result` 474 | ## `Type * Operand : Result` 475 | ## `Type / Operand : Result` 476 | ## `Type % Operand : Result` 477 | ## `Type ^ Operand : Result` 478 | ## `Type .. Operand : Result` 479 | ## `Type == Operand` 480 | ## `Type < Operand` 481 | ## `Type <= Operand` 482 | 483 | Identifiers on other operators have no extra information. 484 | ## `-Type : Result` 485 | ## `#Type : Result` 486 | ## `Type[Operand] : Result` 487 | ## `Type[OperandA] = OperandB` 488 | ## `Type(Parameters) : Result` 489 | ``` 490 | 491 | Real example: 492 | ```markdown 493 | # Operators 494 | ## `CFrame * CFrame : CFrame` 495 | ## `CFrame * Vector3 : Vector3` 496 | ## `CFrame + Vector3 : CFrame` 497 | ## `CFrame - Vector3 : CFrame` 498 | ``` 499 | 500 | In a final rendering, these would produce the following identifiers: 501 | - `doc-operators` 502 | - `doc-op-mul-CFrame` 503 | - `doc-op-mul-Vector3` 504 | - `doc-op-add-Vector3` 505 | - `doc-op-sub-Vector3` 506 | 507 | ## Grammar 508 | Avoid personal language. Do not speak to the reader ("you") or about the writer 509 | ("I"). 510 | 511 | When writing, consider the difference between *declaring* what an entity must do 512 | and *explaining* what it does. Explanations should be used in regards to API 513 | entities, and declarations should be reserved for user-controlled elements, such 514 | as callback functions. 515 | 516 | *Avoid declaring what an entity must do:* 517 | 518 | > GetChildren must return an array of the object's children. 519 | 520 | *Instead, explain what the entity does:* 521 | 522 | > GetChildren returns an array of the object's children. 523 | 524 | In particular, the first sentence of a summary should be written with the 525 | subject omitted, as the subject is usually already nearby. 526 | 527 | > Returns an array of the object's children. 528 | 529 | ### Acronyms 530 | Within a document, the first occurrence of an acronym should include its full 531 | form. 532 | 533 | > The Roblox application programming interface (API) 534 | 535 | Or, 536 | 537 | > The Roblox API (application programming interface) 538 | 539 | ### Event chronology 540 | A Roblox event (RBXScriptSignal) fires in response to some action. The event 541 | should always be described as firing either before or after the action. 542 | 543 | For example, PlayerAdded fires *after* a player is added to the game. When a 544 | listener receives the affected Player object, it will already have its parent 545 | set. On the other hand, PlayingRemoving fires *before* the player is removed 546 | from the game. That is, it will also still have a parent when received by a 547 | listener. 548 | 549 | ### Output messages 550 | Errors, warnings, and other such messages are merely "emitted", rather than 551 | having a specific result such as being "displayed in output". Errors in 552 | particular are usually "thrown", and can be "caught" by `pcall` or coroutines. 553 | 554 | ## Common terminology 555 | Several terms are defined for use across the entire API documentation body. 556 | 557 |
558 | 559 |
object
560 |
An instance of the current class. For example, a member is described in the 561 | context of a class, so an instance of that class is referred to as "the object". 562 | "The current object" may be used when differentiating between the object and 563 | others. In particular, avoid using "instance", as this already has a specific 564 | definition in the context of the API.
565 | 566 |
member
567 |
A secondary entity belonging to a class. Distinct from "child", which 568 | involves a hierarchical relationship with another object.
569 | 570 |
user
571 |
A user of the current entity. Only use specific terms like "developer" when 572 | describing something that applies only to that type of user.
573 | 574 |
game
575 |
A collection of place files, assets, data stores, settings, stats, active 576 | servers, etc.
577 | 578 |
universe
579 |
Equivalent to "game". Used where "game" would be ambiguous.
580 | 581 |
place
582 |
A file containing a single game tree. May also refer to an actively running 583 | job of such.
584 | 585 |
job
586 |
An active copy of a place running on a peer. Avoid using "instance".
587 | 588 |
player
589 |
A person playing a game on Roblox.
590 | 591 |
character
592 |
A player's in-game avatar.
593 | 594 |
peer
595 |
A program that runs Roblox, or the device on which such a program runs.
596 | 597 |
client
598 |
A peer that runs on the player's device.
599 | 600 |
server
601 |
A peer that serves clients.
602 | 603 |
game tree
604 |
A complete object hierarchy with a DataModel as its root.
605 | 606 |
DataModel
607 |
The root object of a game tree. Literally of the DataModel 608 | class. "Workspace", which sometimes occurs in the wild, must not be used for 609 | this.
610 | 611 |
developer
612 |
A person who develops games on Roblox.
613 | 614 |
engineer
615 |
A person who develops Roblox.
616 | 617 |
Remote
618 |
Referring to both RemoteFunctions and RemoteEvents. Should be 619 | capitalized.
620 | 621 |
Bindable
622 |
Referring to both BindableFunctions and BindableEvents. Should be 623 | capitalized.
624 | 625 |
save
626 |
To store a place, model, or other asset locally on the user's device.
627 | 628 |
publish
629 |
To upload a place, model, or other asset to Roblox.
630 | 631 |
632 | -------------------------------------------------------------------------------- /src/doc/en/api/class/HttpService.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Allows a server to make HTTP requests. 3 | 4 | # Details 5 | Requests are made with the [RequestAsync][RA] function. The [GetAsync][GA] and 6 | [PostAsync][PA] functions may also be used as shorthand for specific HTTP 7 | methods, but these are discouraged in favor of RequestAsync. 8 | 9 | ## Headers 10 | Each request function can receive custom headers to be included in the request. 11 | However, the following headers are locked, and cannot be included by the caller: 12 | 13 | Header | Notes 14 | --------------------|------ 15 | `Accept-Encoding` | 16 | `Connection` | 17 | `Content-Encoding` | Allowed by RequestAsync. 18 | `Content-Length` | 19 | `Content-Type` | Allowed by RequestAsync. 20 | `Expect` | 21 | `Forwarded` | 22 | `Host` | 23 | `Proxy-Connection` | 24 | `User-Agent` | 25 | `Via` | 26 | `X-Att-Deviceid` | 27 | `X-Forwarded-For` | 28 | `X-Forwarded-Host` | 29 | `X-Forwarded-Proto` | 30 | `X-Wap-Profile` | 31 | 32 | Attempting to include a locked header causes the following error to be thrown: 33 | 34 | Header "HEADER" is not allowed! 35 | 36 | Where `HEADER` is the name of the header. 37 | 38 | By default, HttpService includes a number of headers along with each request: 39 | 40 | Header | Value | Notes 41 | ------------------|-------------------|------ 42 | `Accept` | `*/*` | 43 | `Accept-Encoding` | `gzip, deflate` | 44 | `Cache-Control` | `no-cache` | 45 | `Content-Length` | (body length) | Length of the given body. Not included if the body is empty. 46 | `Host` | (URL host) | Host part of the given URL. Not included if the URL has no host (e.g. an IP is used instead). 47 | `Roblox-Id` | (place ID) | Corresponds to [DataModel.PlaceId](class:DataModel/PlaceId). 48 | `User-Agent` | (user agent) | Depends on the current peer. 49 | 50 | Such headers that are not locked can be overridden. These headers are included 51 | with every request, except for `Content-Length`, which is included with all 52 | methods except `GET` and `HEAD`. Certain request functions may include other 53 | headers. 54 | 55 | Requests are sent with a specific user agent that depends on the current peer: 56 | 57 | Peer | User agent 58 | -------|----------- 59 | Server | `RobloxGameCloud/1.0 (+http://www.roblox.com)` 60 | Studio | `RobloxStudio/WinInet` 61 | 62 | Header names are case-insensitive. If multiple equivalent headers are specified, 63 | only one is chosen (which header is chosen is undefined). 64 | 65 | ## Limits 66 | Only servers can make requests. If a request function is called on a client, the 67 | following error is thrown: 68 | 69 | Http requests can only be executed by game server 70 | 71 | The URL schemes allowed by HttpService are `http` and `https`. Domains are 72 | filtered using a blacklist; requests to Roblox domains are disallowed, while 73 | requests to any other domains are allowed. If a URL is disallowed or otherwise 74 | invalid, then the following error will be thrown: 75 | 76 | URL: Trust check failed 77 | 78 | Where `URL` is the given URL. Some request functions may throw a more specific 79 | error instead. 80 | 81 | Requests made by HttpService are rate-limited to 500 requests per minute. When a 82 | request is made after the limit is exceeded, the following error is thrown: 83 | 84 | Number of requests exceeded limit 85 | 86 | There is a limit to the number of concurrent requests that can be made by 87 | HttpService. When a request is made, it is put into a "slot", and remains there 88 | until the request is resolved. When all slots are occupied, new requests will 89 | block until a slot becomes available. 90 | 91 | ## Other errors 92 | If a given URL is empty, then the following error will be thrown: 93 | 94 | Empty URL 95 | 96 | If the HTTP client encounters an error while making a request, then it will be 97 | thrown as the following: 98 | 99 | HttpError: MESSAGE 100 | 101 | Where `MESSAGE` describes the error. For example, if the DNS server was unable 102 | to resolve the given domain, the error will be `HttpError: DnsResolve`. 103 | 104 | # Members 105 | 106 | ## GenerateGUID 107 | Generates a Universally Unique Identifier (UUID). 108 | 109 | ### Details 110 | GenerateGUID returns a UUID version 4 string as defined by [RFC 4122][rfc4122], 111 | which is generated pseudo-randomly. 112 | 113 | If *wrapInCurlyBraces* is true, then the returned string will begin and end with 114 | curly braces (`{}`). If false, then the braces are omitted. 115 | 116 | [rfc4122]: https://tools.ietf.org/html/rfc4122 117 | 118 | ## GetAsync 119 | [GA]: member:GetAsync 120 | 121 | Sends a GET request to a website. 122 | 123 | *See the [HttpService Details section](#details) for information regarding all 124 | request functions.* 125 | 126 | ### Details 127 | GetAsync makes a request using the GET method. *url* is the URL to which the 128 | request will be sent. If *nocache* is true, then the `Cache-Control` header of 129 | the request will be set to `no-cache`. *headers* is an optional table of HTTP 130 | headers. 131 | 132 | 133 | 134 | If successful, GetAsync returns the body of the response. 135 | 136 | *headers* is an optional table for specifying additional headers to be included 137 | with the request. Each entry must be a key-value pair, where the key is a string 138 | indicating a header name, and the value is a string indicating the header value. 139 | 140 | If the response returns a non-successful status code, then the status is thrown 141 | as an error: 142 | 143 | HTTP 000 (MESSAGE) 144 | 145 | Where `000` is the status code, and `MESSAGE` is the status message. 146 | 147 | #### Bugs 148 | `Cache-Control` is set to `no-cache` regardless of the *nocache* argument. 149 | 150 | ## GetHttpEnabled 151 | ## HttpEnabled 152 | Determines whether HttpService can make requests. 153 | 154 | ### Details 155 | If false, then [GetAsync](member:GetAsync), [PostAsync](member:PostAsync), and 156 | [RequestAsync](member:RequestAsync) will throw the following error: 157 | 158 | Http requests are not enabled. Enable via game settings 159 | 160 | ## JSONDecode 161 | Decodes a JSON-formatted string into a value. The string is decoded according to 162 | [RFC8259][RFC8259]. 163 | 164 | [RFC8259]: https://tools.ietf.org/html/rfc8259 165 | 166 | ### Details 167 | The following JSON types are converted into a corresponding Lua type: 168 | 169 | - A null is decoded into a Lua nil. 170 | - A boolean is decoded into a Lua boolean. 171 | - A number is decoded into the nearest representing Lua number. 172 | - A string is decoded into a Lua string. 173 | - An array is decoded into a Lua table, where each entry in the array is an 174 | entry in the table, with indices starting at 1. 175 | - An object is decoded into a Lua table, where each field of the object is a 176 | key-value pair in the table. 177 | 178 | ## JSONEncode 179 | Encodes *input* into a JSON-formatted string. *input* cannot be nil. 180 | 181 | ### Details 182 | A **boolean** is mapped directly to a JSON boolean. A **number** is encoded as a 183 | JSON number. Infinity and NaN are encoded as a JSON null. 184 | 185 | A **string** is encoded as a UTF-8 string. The following characters are escaped: 186 | 187 | Character | Code | Escape 188 | ----------------|------|------- 189 | Backspace | 0x08 | `\b` 190 | Horzontal tab | 0x09 | `\t` 191 | Line feed | 0x0A | `\n` 192 | Form feed | 0x0C | `\f` 193 | Carriage Return | 0x0D | `\r` 194 | Double quote | 0x22 | `\"` 195 | Backslash | 0x5C | `\\` 196 | 197 | Control characters (0x00 - 0x1F) not in this list are escaped as `\u00XX`, where 198 | `XX` is the character code in hexadecimal. 199 | 200 | Other unicode characters are encoded as-is. A malformed unicode character within 201 | any encoded string causes the following error to be thrown: 202 | 203 | Can't convert to JSON 204 | 205 | A **table** is encoded as either a JSON array or a JSON object, which depends on 206 | the content. A table is interpreted as an array if it is empty, or if it 207 | contains the integer 1 as a key. Otherwise, it is treated as an object. 208 | 209 | Tables are encoded recursively. If a table that is being or has already been 210 | encoded is traversed, the following error is thrown: 211 | 212 | tables cannot be cyclic 213 | 214 | A table interpreted as an array encodes integer keys from 1 to the length of 215 | the table. Other keys are ignored, and are not traversed. 216 | 217 | A table interpreted as an object encodes certain types of keys to JSON strings. 218 | Keys are encoded in the same way as string values. The method for encoding 219 | non-string keys is undefined. It is possible that such a key will be converted 220 | to a string, throw an error, or be ignored entirely. 221 | 222 | Other types are encoded as a JSON null. 223 | 224 | ## PostAsync 225 | [PA]: member:PostAsync 226 | 227 | Sends a POST request to a website. 228 | 229 | ### Details 230 | PostAsync makes a request using the POST method. *url* is the URL to which the 231 | request will be sent, and *data* is the body of the request. 232 | 233 | *content_type* optionally sets the `Content-Type` header according to the given 234 | [HttpContentType][HCT] value. 235 | 236 | *compress* optionally determines whether the body will be compressed with gzip 237 | encoding. The body will be sent compressed only if the compressed content is 238 | shorter than the uncompressed content. If compressed, then the 239 | `Content-Encoding` header is set to `gzip`. 240 | 241 | *headers* is an optional table for specifying additional headers to be included 242 | with the request. Each entry must be a key-value pair, where the key is a string 243 | indicating a header name, and the value is a string indicating the header value. 244 | 245 | If the response returns a non-successful status code, then the status is thrown 246 | as an error: 247 | 248 | HTTP 000 (MESSAGE) 249 | 250 | Where `000` is the status code, and `MESSAGE` is the status message. 251 | 252 | The length of *data* cannot be greater than or equal to 1024KB (maximum is 253 | 1,023,999 bytes). If *data* is too large, then the following error will be 254 | thrown: 255 | 256 | Post data too large. Limit: 1024 KB. Post size: SIZE KB 257 | 258 | Where `SIZE` is the length of *data* in kilobytes. Note that [RequestAsync][RA] 259 | does not have this limit. 260 | 261 | [HCT]: enum:HttpContentType 262 | 263 | ## RequestAsync 264 | [RA]: member:RequestAsync 265 | 266 | Sends an HTTP request and receives the response. 267 | 268 | *See the [HttpService Details section](#details) for information regarding all 269 | request functions.* 270 | 271 | ### Details 272 | *requestOptions* specifies the content of the request using the following 273 | fields: 274 | 275 | Field | Type | Required | Description 276 | ----------|------------|----------|------------ 277 | `Body` | string | no | The body of the request. 278 | `Headers` | Dictionary | no | A table containing headers to send with the request. 279 | `Method` | string | no | The HTTP request method to be used. Defaults to `GET`. 280 | `Url` | string | yes | The URL to which the request will be sent. 281 | 282 | If `Url` has a blacklisted Roblox domain, then the following error will be 283 | thrown: 284 | 285 | HttpService is not allowed to access ROBLOX resources 286 | 287 | `Method`, which is case-sensitive, must be one of `GET`, `HEAD`, `POST`, `PUT`, 288 | `DELETE`, `TRACE`, `OPTIONS`, `CONNECT`, or `PATCH`. If `Method` is `GET` or 289 | `HEAD`, and `Body` is specified, then the following error will be thrown: 290 | 291 | Invalid request options, Body should be empty for 'GET' or 'HEAD' method 292 | 293 | RequestAsync blocks until a response has been received and processed, or the 294 | request has timed out. 295 | 296 | Each entry to the `Headers` table must be a key-value pair, where the key is a 297 | string indicating a header name, and the value is a string indicating the header 298 | value. 299 | 300 | #### Response 301 | If successful, RequestAsync returns response data as a table with the following 302 | fields: 303 | 304 | Field | Type | Description 305 | ----------------|------------|------------ 306 | `Body` | string | The body of the response. 307 | `Headers` | Dictionary | A table of response headers. 308 | `StatusCode` | int | The HTTP status code of the response. 309 | `StatusMessage` | string | A readable message corresponding to the StatusCode. 310 | `Success` | bool | Whether or not the request succeeded. 311 | 312 | The response Headers field is a table, where each key is a string indicating a 313 | header name, and the value is a string indicating the header value. Header 314 | names, which are case-insensitive, are normalized to lowercase. If a header was 315 | sent multiple times, the value of the latest such header is selected. 316 | 317 | ## RequestInternal 318 | ## SetHttpEnabled 319 | ## UrlEncode 320 | -------------------------------------------------------------------------------- /src/doc/en/api/class/Instance.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | The root class of all classes in the API. 3 | 4 | # Details 5 | 6 | ## Hierarchy 7 | Objects are arranged in a tree structure. An object can have zero or more 8 | **child** objects, which are below it in the tree. Conversely, an object can 9 | have at most one **parent** object, which is above it in the tree. The **root** 10 | of a tree can have children, but has no parent. Objects that share the same 11 | parent are referred to as **siblings**. 12 | 13 | An **ancestor** is any object that is reachable by repeatedly moving from child 14 | to parent. That is, an ancestor is the parent of an object, or the parent's 15 | parent, and so on, all the way to the root of the tree. A **descendant** is any 16 | object that is reachable by repeatedly moving from parent to child. That is, a 17 | descendant is a child of an object, or a child of the child, and so on. 18 | 19 | ## References 20 | Whenever Lua accesses an object for the first time, a userdata is created. This 21 | userdata acts as a "proxy" or "bridge" that enables the object to be accessed in 22 | Lua. The userdata will be reused while it exists, and recreated when it doesn't, 23 | which is a process that is meant to be completely opaque to Lua. For all intents 24 | and purposes, the userdata *is* the object. As such, almost no distinction will 25 | be made between the two in this reference. 26 | 27 | In regards to garbage collection, Lua's garbage collector has no knowledge of 28 | the object, and does not affect the object in any way. The memory allocated to 29 | the object is managed by a separate, internal system. On the other hand, the 30 | userdata *is* known by the garbage collector, and may therefore be collected 31 | when it has no more strong references in Lua, just as any other Lua value. 32 | 33 | It must be noted that an object makes no strong references to its userdata. A 34 | consequence of this is that, when there are only weak references to the 35 | userdata, **the userdata can be garbage collected while the object is still 36 | accessible.** For example, if the userdata's only reference is in a weak table, 37 | and the object is in the game tree, then userdata will be collected, removing it 38 | from the weak table. Despite this, the object still exists in the game tree, and 39 | can be accessed as usual. 40 | 41 | ## Replication 42 | For each connected peer, a particular object will usually have a copy of itself 43 | that exists on the peer. When an object is "replicated", each of these copies 44 | are being synchronized across the network. Several aspects of an object are 45 | replicated: 46 | 47 | - The presence or absence of the object. 48 | - The properties of the object. 49 | - The children of the object. 50 | 51 | From the perspective of the hierarchy, replication behaves as though the object 52 | is being added, removed, or modified. Events will fire in response to such 53 | replicated changes. 54 | 55 | When an object exists on the server, changes to the object on the server are 56 | replicated to each client. 57 | 58 | When an object exists on the server, but its class has the NotReplicated tag, 59 | then no aspects of the object are replicated. This status is "inherited" by the 60 | object's parent. That is, if an object is tagged as NotReplicated, then its 61 | descendants will also not replicate. 62 | 63 | Note that, while two non-replicating objects (one on each peer) may be similar, 64 | they are not considered the same object. For example, [ServerStorage][SS] will 65 | exist on both the server and a client. This is because of how singleton services 66 | are initialized, and not because ServerStorage has somehow been replicated 67 | partially. 68 | 69 | When an object exists on the server, and the object's class has the 70 | PlayerReplicated tag, then changes to the object are replicated only to a 71 | specific client. 72 | 73 | When an object exists only on the client, changes are generally never 74 | replicated. In previous versions, changes on a client were allowed to replicate 75 | to the server (and then to each other client). Because of security concerns, it 76 | later became possible to disable this behavior with the [FilteringEnabled][FE] 77 | property. Eventually, this toggle was removed entirely, and the behavior became 78 | generally disallowed. 79 | 80 | Physics replication is a separate system with its own behaviors. 81 | 82 | Special exceptions may exist. For example, [ReplicatedFirst][RF] replicates from 83 | the server to a client exactly once, per client, after the client connects. 84 | Another example is player characters: certain aspects of a character can 85 | replicate from a client to the server (and then to each other client). 86 | 87 | [FE]: class:Workspace/FilteringEnabled 88 | [RF]: class:ReplicatedFirst 89 | [SS]: class:ServerStorage 90 | 91 | # Constructors 92 | 93 | ## `Instance.new(className: string, parent: Instance?): Instance` 94 | Returns a new instance of a class. *className* is the name of the class. 95 | *parent* is an optional object to which the [Parent](member:Parent) property 96 | will be set before the object is returned. If unspecified, then the object's 97 | Parent will be nil. 98 | 99 | Per class, each property of the instance is initialized with a default value. 100 | The default value of an inherited property depends on the current class (for 101 | example, the [Name](member:Name) property of a [Seat](class:Seat) initializes as 102 | "Seat" rather than "Part" or "Instance"). Default values are considered a part 103 | of a class's API, and so will not change arbitrarily over time. 104 | 105 | If an instance of the given class cannot be created, then the following error is 106 | thrown: 107 | 108 | Unable to create an Instance of type "CLASS" 109 | 110 | Where `CLASS` is the name of the given class. Existing classes that cannot be 111 | created include abstract classes, services, and classes tagged as NotCreatable. 112 | 113 | # Examples 114 | Demonstration of an object's weak reference behavior. An object's userdata can 115 | be garbage collected while the object is in the game tree. 116 | 117 | ```lua 118 | -- Table with weak value references. 119 | local weakTable = setmetatable({}, {__mode='v'}) 120 | 121 | -- Create an object, then add it to the game tree and the weak table. 122 | local object = Instance.new("BoolValue") 123 | object.Parent = workspace 124 | weakTable[1] = object 125 | object = nil -- Remove strong reference to the object. 126 | 127 | print("Reference:", weakTable[1]) 128 | --> Reference: Value (userdata still exists) 129 | 130 | -- Wait until the userdata is collected. 131 | while #weakTable > 0 do 132 | wait() 133 | end 134 | 135 | print("Reference:", weakTable[1]) 136 | --> Reference: nil (userdata was collected) 137 | 138 | print("Object:", workspace.Value) 139 | --> Object: Value (object still exists) 140 | ``` 141 | 142 | # Members 143 | 144 | ## AncestryChanged 145 | Fired after the ancestry of the object changes. 146 | 147 | ### Details 148 | AncestryChanged fires after the [Parent](member:Parent) of the object or any 149 | ancestor has changed. *child* is the object whose Parent has changed, and is 150 | never nil. *parent* is the new value of the Parent, which may be nil. 151 | 152 | If changes only to the Parent of the object need to be detected, then 153 | [GetPropertyChangedSignal][GPCS] should be used instead. 154 | 155 | AncestryChanged is affected by [parent locking](#doc-locking). Modifying the 156 | Parent of *child* before it has resolved should be avoided. 157 | 158 | ## Archivable 159 | Determines whether the object can be serialized. 160 | 161 | ### Details 162 | When Archivable is false, the object will not be included when it is a part of a 163 | place or model that is saved to a file or published to Roblox. The object is 164 | also excluded from being copied with [Clone](member:Clone). 165 | 166 | ### Examples 167 | Avoid cloning descendants by temporarily setting Archivable. 168 | ```lua 169 | function CopyObject(object) 170 | local children = object:GetChildren() 171 | local currentState = {} 172 | for i, child in pairs(children) do 173 | currentState[i] = child.Archivable 174 | child.Archivable = false 175 | end 176 | local copy = object:Clone() 177 | for i, child in pairs(children) do 178 | child.Archivable = currentState[i] 179 | end 180 | return copy 181 | end 182 | 183 | local part = Instance.new("Part") 184 | part.Name = "Original" 185 | part.Color = BrickColor.Red().Color 186 | local smoke = Instance.new("Smoke", part) 187 | smoke.Archivable = false 188 | Instance.new("Fire", part) 189 | part.Parent = workspace 190 | 191 | local copy = CopyObject(part) 192 | copy.Name = "Copy" 193 | copy.Position = Vector3.new(8, 0, 0) 194 | copy.Parent = workspace 195 | ``` 196 | 197 | ## Changed 198 | Fired after a property of the object changes. 199 | 200 | ### Details 201 | *property* is the name of the property that changed. This can be used to index 202 | the object to get the property's new value. 203 | 204 | Changed is fired by changes to *all* properties of the object. If only one or a 205 | few properties need to be monitored, [GetPropertyChangedSignal][GPCS] should be 206 | used instead. 207 | 208 | For performance reasons, changes to a property made by the physics engine will 209 | not cause Changed to fire. For example, Changed will fire when the 210 | [Position](class:Part/Position) of a [Part](class:Part) is modified by a script, 211 | but will not fire while the part is falling. 212 | 213 | #### Bugs 214 | Certain classes have hidden properties that cannot be indexed, but can still 215 | cause Changed to fire. When indexing such an object with *property* unguarded, 216 | using pcall is recommended. 217 | 218 | ### Examples 219 | Copy changes in appearance from one part to another. 220 | ```lua 221 | local appearance = { 222 | Color = true, 223 | Material = true, 224 | Reflectance = true, 225 | Transparency = true, 226 | } 227 | local original = Instance.new("Part", workspace) 228 | local copy = Instance.new("Part", workspace) 229 | original.Changed:Connect(function(property) 230 | if not appearance[property] then 231 | return 232 | end 233 | copy[property] = original[property] 234 | end) 235 | 236 | original.Position = Vector3.new(8, 0, 0) 237 | original.Color = BrickColor.Blue().Color 238 | ``` 239 | 240 | Safely copy all changes from one part to another. 241 | ```lua 242 | local original = Instance.new("Part", workspace) 243 | local copy = Instance.new("Part", workspace) 244 | original.Changed:Connect(function(property) 245 | local ok, value = pcall(function() 246 | return original[property] 247 | end) 248 | if not ok then 249 | return 250 | end 251 | copy[property] = value 252 | end) 253 | 254 | copy.Position = Vector3.new(8, 0, 0) 255 | original.Color = BrickColor.Blue().Color 256 | ``` 257 | 258 | ## ChildAdded 259 | Fired after a child is added to the object. 260 | 261 | ## ChildRemoved 262 | Fired after a child is removed from the object. 263 | 264 | ## ClassName 265 | Returns the name of the object's class. 266 | 267 | ## ClearAllChildren 268 | Removes all of the children from the object. 269 | 270 | ## Clone 271 | Creates a deep copy of the object. 272 | 273 | ## DataCost 274 | Returns the cost of saving the object to data persistence, in data units. 275 | 276 | ## DescendantAdded 277 | Fired after a descendant of the object is added. 278 | 279 | ## DescendantRemoving 280 | Fired before a descendant of the object is removed. 281 | 282 | ## Destroy 283 | Removes the object and marks it as destroyed, preventing reuse. 284 | 285 | ## FindFirstAncestor 286 | Returns the first ancestor of the object whose [Name](member:Name) matches the 287 | given name. 288 | 289 | ## FindFirstAncestorOfClass 290 | Returns the first ancestor of the object whose [ClassName](member:ClassName) 291 | matches the given name. 292 | 293 | ## FindFirstAncestorWhichIsA 294 | Returns the first ancestor of the object whose class inherits a class of the 295 | given name. 296 | 297 | ## FindFirstChild 298 | Returns the first child of the object whose [Name](member:Name) matches the given 299 | name. 300 | 301 | ## FindFirstChildOfClass 302 | Returns the first child of the object whose [ClassName](member:ClassName) 303 | matches the given name. 304 | 305 | ## FindFirstChildWhichIsA 306 | Returns the first child of the object whose class inherits a class of the given 307 | name. 308 | 309 | ## GetChildren 310 | Returns a list of the object's children. 311 | 312 | ## GetDebugId 313 | Returns a value that uniquely identifies the object. 314 | 315 | ## GetDescendants 316 | Returns a list of all the descendants of the object. 317 | 318 | ## GetFullName 319 | Returns a name formatted according to the ascendants of the object. 320 | 321 | ## GetPropertyChangedSignal 322 | [GPCS]: member:GetPropertyChangedSignal 323 | 324 | Returns a [signal](type:RBXScriptSignal) that fires after a property of the 325 | given name changes. 326 | 327 | ## IsA 328 | Returns whether the object's class inherits from a class of the given name. 329 | 330 | ## IsAncestorOf 331 | Returns whether the object is an ancestor of a given object. 332 | 333 | ### Details 334 | `nil` can be passed as an argument. Because `nil` is not a real object, and 335 | therefore can never be a child, passing `nil` always returns false. 336 | 337 | ## IsDescendantOf 338 | Returns whether the object is a descendant of a given object. 339 | 340 | ### Details 341 | `nil` can be passed as an argument. Because the root of a tree always has a nil 342 | parent, passing `nil` always returns true. 343 | 344 | ## Name 345 | Specifies a string used to identify the object. 346 | 347 | The value of Name is constrained to a maximum length of 100 bytes. On 348 | assignment, extra bytes are truncated. 349 | 350 | ### Details 351 | While Name is generally used to differentiate between sibling objects, no 352 | attempts to enforce the uniqueness of the value are made. 353 | 354 | ## Parent 355 | Specifies an object that the current object is a child of. 356 | 357 | ### Details 358 | An object cannot be its own parent. Attempting to set Parent to the object 359 | results in the following error: 360 | 361 | ``` 362 | Attempt to set OBJECT as its own parent 363 | ``` 364 | 365 | Where `OBJECT` is the [full name](member:GetFullName) of the object. 366 | 367 | An object also cannot be a child of one of its descendants. Attempting to set 368 | Parent to a descendant results in the following error: 369 | 370 | ``` 371 | Attempt to set parent of OBJECT to VALUE would result in circular reference 372 | ``` 373 | 374 | Where `OBJECT` is the full name of the object, and `VALUE` is the full name of 375 | the descendant. 376 | 377 | #### Locking 378 | After its value is changed, the Parent property is locked, and cannot be 379 | changed. This is to prevent events from recursively firing themselves. 380 | Attempting to set Parent while it is locked fails without throwing an error, and 381 | the following warning is emitted: 382 | 383 | ``` 384 | Something unexpectedly tried to set the parent of OBJECT to NEWVALUE while trying to set the parent of OBJECT. Current parent is VALUE. 385 | ``` 386 | 387 | `OBJECT` is the [Name](member:Name) of the object whose Parent is being 388 | modified. `NEWVALUE` is the Name of the object to which the Parent was attempted 389 | to be set. `VALUE` is the Name of the current parent. "NULL" is used if either 390 | value is nil. 391 | 392 | Once all listeners from associated events have resolved, the Parent is unlocked. 393 | A listener is resolved when its thread is either dead or has yielded. 394 | 395 | 397 | 398 | ## Remove 399 | Removes the object from its parent. 400 | 401 | ## RobloxLocked 402 | Determines the restrictions of indexing the object. 403 | 404 | ## WaitForChild 405 | Blocks until an object of the given name is a child of the object. 406 | 407 | ## archivable 408 | Determines whether the object can be serialized. 409 | 410 | ## childAdded 411 | Fired after a child is added to the object. 412 | 413 | ## children 414 | Returns a list of the object's children. 415 | 416 | ## className 417 | Returns the name of the object's class. 418 | 419 | ## clone 420 | Creates a deep copy of the object. 421 | 422 | ## destroy 423 | Removes the object and marks it as destroyed, preventing reuse. 424 | 425 | ## findFirstChild 426 | Returns the first child of the object whose [Name](member:Name) matches the given 427 | name. 428 | 429 | ## getChildren 430 | Returns a list of the object's children. 431 | 432 | ## isA 433 | Returns whether the object's class inherits from a class of the given name. 434 | 435 | ## isDescendantOf 436 | Returns whether the object is a descendant of a given object. 437 | 438 | ## remove 439 | Removes the object from its parent. 440 | -------------------------------------------------------------------------------- /src/doc/en/api/class/PhysicsSettings.md: -------------------------------------------------------------------------------- 1 | # Members 2 | 3 | ## PhysicsEnvironmentalThrottle 4 | Controls the amount of throtting applied to physics simulation. 5 | 6 | Throttling is represented as a percentage of the normal simulation rate. 100% 7 | throttling means that the simulation is running at the usual rate, 50% means the 8 | simulation is runing at half the speed, and 0% means the simulation is stopped. 9 | -------------------------------------------------------------------------------- /src/doc/en/api/class/StarterGui.md: -------------------------------------------------------------------------------- 1 | # Members 2 | 3 | ## ResetPlayerGuiOnSpawn 4 | Globally controls the resetting behavior of 5 | [LayerCollectors](class:LayerCollector) under the [PlayerGui](class:PlayerGui). 6 | 7 | ### Details 8 | When ResetPlayerGuiOnSpawn is true (the default), a LayerCollector under the 9 | PlayerGui will reset if its [ResetOnSpawn](class:LayerCollector/ResetOnSpawn) 10 | property is also true. When ResetPlayerGuiOnSpawn is false, LayerCollectors will 11 | never reset, regardless of their ResetOnSpawn property. 12 | 13 | ResetPlayerGuiOnSpawn is deprecated. To suppress the resetting behavior of a 14 | LayerCollector, its ResetOnSpawn property should explicitly be set to false. 15 | -------------------------------------------------------------------------------- /src/doc/en/api/class/Studio.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Configures settings specific to Roblox Studio. 3 | 4 | # Details 5 | The Studio class only exists on the Studio build of Roblox. As such, it is not 6 | relevant for game clients or servers. 7 | 8 | # Members 9 | ## Always Save Script Changes 10 | [ASSC]: member:Always%20Save%20Script%20Changes 11 | 12 | Sets whether scripts will be updated when modified while the game is running. 13 | 14 | ### Details 15 | When a user is testing a script by running Play Solo, they may accidentally make 16 | modifications to the script while Play Solo is still running, which would 17 | normally be discarded once Play Solo is stopped. Studio handles this problem by 18 | prompting the user to propagate the changes back to scripts in the non-running 19 | game tree. 20 | 21 | When enabled, this setting suppresses the prompt and propagates script changes 22 | automatically. 23 | 24 | ## Animate Hover Over 25 | [AHO]: member:Animate%20Hover%20Over 26 | 27 | Determines whether the hover-over box is animated. 28 | 29 | ### Details 30 | See [Show Hover Over][SHO] for a description of the hover-over box. 31 | 32 | While enabled, the hover-over box will animate between two colors determined by 33 | [Select Color][SelectColor] and [Hover Over Color][HOC]. The speed of this 34 | animation is determined by [Hover Animate Speed][HAS]. 35 | 36 | ## Auto Closing Brackets 37 | [ACB]: member:Auto%20Closing%20Brackets 38 | 39 | Determines whether opening brackets are automatically closed while typing in the 40 | script editor. 41 | 42 | ### Details 43 | When a `(`, `[` or `{` character is typed in the script editor while this 44 | setting is enabled, the corresponding closing bracket is inserted after the 45 | cursor. The character is not inserted if there is a non-whitespace character 46 | directly after the cursor. 47 | 48 | If an opening bracket is deleted while the cursor is directly between the two 49 | matching brackets (that is, both characters are adjacent), then both characters 50 | will be deleted. 51 | 52 | #### Bugs 53 | When deleting an opening bracket as described previously, the matching closing 54 | bracket may not always be deleted. 55 | 56 | ## Auto Closing Quotes 57 | [ACQ]: member:Auto%20Closing%20Quotes 58 | 59 | Determines whether opening strings quotes are automatically closed while typing 60 | in the script editor. 61 | 62 | ### Details 63 | When a `"` or `'` character is typed to open a Lua string in the script editor 64 | while this setting is enabled, the corresponding character to close the string 65 | is inserted after the cursor. 66 | 67 | The closing character is inserted only within the scope of a quoted Lua string. 68 | For example, it will not be inserted while in the scope of a comment or a 69 | multiline string. 70 | 71 | ## Auto Indent 72 | [AI]: member:Auto%20Indent 73 | 74 | Determines whether indentation is automatically inserted while typing in the 75 | script editor. 76 | 77 | ### Details 78 | While enabled, when a new block is opened (such as typing `function`, `while`, 79 | or `if`), tab characters will be inserted until the cursor is one indentation 80 | level deeper. The `end` keyword will also be inserted on the next line to close 81 | the block. After typing certain keywords like `elseif` or `else`, their 82 | indentation will be adjusted automatically. 83 | 84 | ## Auto-Recovery Enabled 85 | [ARE]: member:Auto-Recovery%20Enabled 86 | 87 | Determines whether the current place file is periodically backed up to a 88 | recovery file. 89 | 90 | ### Details 91 | When Studio is closed, all recovery files are deleted. In the event of a crash, 92 | such files will not be deleted. Whenever Studio starts up, if it is the only 93 | instance of Studio running, it will detect existing recovery files, and ask the 94 | user what to do with them. The user may open a file, ignore, or delete all 95 | recovery files. 96 | 97 | ## Auto-Recovery Interval (Minutes) 98 | [ARI]: member:Auto-Recovery%20Interval%20%28Minutes%29 99 | 100 | Determines how often a recovery file is made, in minutes. 101 | 102 | ## Auto-Recovery Path 103 | [ARP]: member:Auto-Recovery%20Path 104 | 105 | Determines the location in the file system to which recovery files will be 106 | written. 107 | 108 | ## Background Color 109 | [BC]: member:Background%20Color 110 | 111 | Determines the background color in the script editor. 112 | 113 | ## Basic Objects Display Mode 114 | [BODM]: member:Basic%20Objects%20Display%20Mode 115 | 116 | Determines the direction of classes listed in the Advanced Objects panel. 117 | 118 | ### Details 119 | Classes are listed in multiple columns when Horizontal, and a single column when 120 | Vertical. 121 | 122 | ## Built-in Function Color 123 | [BiFC]: member:Built-in%20Function%20Color 124 | 125 | Determines the color of built-in variables in the script editor. 126 | 127 | ## Camera Mouse Wheel Speed 128 | [CMWS]: member:Camera%20Mouse%20Wheel%20Speed 129 | 130 | Determines how many studs the camera moves when scrolling the mouse wheel. 131 | 132 | ### Details 133 | The mouse wheel is used to "zoom" the camera. Rather than performing a focal 134 | zoom or magnification, the camera is translated forwards or backwards. This 135 | setting determines how many studs the camera moves every tick of the mouse 136 | wheel. The direction the camera moves is determined by [Camera Zoom to Mouse 137 | Position][CZtMP]. 138 | 139 | ## Camera Shift Speed 140 | [CSS]: member:Camera%20Shift%20Speed 141 | 142 | Determines the movement speed of the camera while the shift key is held. 143 | 144 | ### Details 145 | The "base speed" of the camera (as determined by [Camera Speed][CS]) is 146 | multiplied by the value of this setting to determine the "shift speed", in studs 147 | per second. This will be the camera's velocity when the camera is moving while 148 | the shift key is held. Unlike the active speed, which accelerates, this speed is 149 | constant. 150 | 151 | ## Camera Speed 152 | [CS]: member:Camera%20Speed 153 | 154 | Determines the base movement speed of the camera. 155 | 156 | ### Details 157 | The value of this setting is multiplied by 30, which determines the "base speed" 158 | of the camera in studs per second. 159 | 160 | When the camera starts moving, this base speed is used as the "active speed", 161 | which is the velocity of the camera while no modifiers (such as [Camera Shift 162 | Speed][CSS]) are held. 163 | 164 | 2 seconds after movement starts, the active speed begins accelerating at a rate 165 | of half the base speed (`CameraSpeed * 30 / 2`), and will continue accelerating 166 | in the background even while modifiers are held. The active speed resets only 167 | after the camera stops moving. 168 | 169 | Note that the camera is considered moving while any of the camera movement keys 170 | are held. The camera will still be "moving" even while two opposing keys that 171 | cancel each other out are held (such as left and right, or forward and back). 172 | 173 | ## Camera Zoom to Mouse Position 174 | [CZtMP]: member:Camera%20Zoom%20to%20Mouse%20Position 175 | 176 | Determines the direction in which the camera zooms. 177 | 178 | ### Details 179 | When this setting is enabled, the camera will zoom in the direction of the 180 | position of the mouse cursor. When disabled, the camera will zoom in the 181 | direction of its [look vector](type:CFrame). 182 | 183 | ## Clear Output On Start 184 | [COOS]: member:Clear%20Output%20On%20Start 185 | 186 | Determines whether the output panel is cleared when the place runs. 187 | 188 | ### Details 189 | When the place is tested with Run or Play Solo while this setting is enabled, 190 | the output panel will be cleared. 191 | 192 | ## Comment Color 193 | [CC]: member:Comment%20Color 194 | 195 | Determines the color of Lua comments in the script editor. 196 | 197 | ## DefaultScriptFileDir 198 | [DSFD]: member:DefaultScriptFileDir 199 | 200 | Determines the starting location of the file dialog when choosing a script to 201 | run. 202 | 203 | ### Details 204 | When the Run Script action is activated, a dialog prompts the user to choose a 205 | file to run as a script. This setting determines the starting location of the 206 | dialog, and is updated, after a file is selected, to the location of the 207 | selection. 208 | 209 | #### Bugs 210 | After selecting a file, the displayed value of the setting is not updated, 211 | although the value will be updated after Studio is restarted. 212 | 213 | ## DeprecatedObjectsShown 214 | [DOS]: member:DeprecatedObjectsShown 215 | 216 | Determines whether deprecated APIs are visible in the Object Browser. 217 | 218 | ### Details 219 | This setting does not affect autocomplete or menus that insert objects. 220 | 221 | ## Device Pairing Code 222 | [DPC]: member:Device%20Pairing%20Code 223 | 224 | A code used to associate Studio sessions with a mobile device. 225 | 226 | ## Disable Accurate Play Solo 227 | [DAPS]: member:Disable%20Accurate%20Play%20Solo 228 | 229 | Determines whether Accurate Play Solo is disabled. 230 | 231 | ### Details 232 | While this setting is disabled, running Play Solo causes two separate data 233 | models to be simulated, one each for the client and the server. While enabled, 234 | Play Solo will simulate both the client and the server in a single data model. 235 | 236 | While Accurate Play Solo is running, the viewport will have a colored border 237 | indicating which data model is being viewed, as well as where the command bar 238 | runs. The current view can be toggled by an action visible while Play Solo is 239 | running. In the output panel, messages are marked with the color that 240 | corresponds to the data model from which the message originates. Green indicates 241 | the server, and blue indicates the client. 242 | 243 | ## Drag Multiple Parts As Single Part 244 | [DMPASP]: member:Drag%20Multiple%20Parts%20As%20Single%20Part 245 | 246 | Causes multiple parts to behave as a single part while being dragged. 247 | 248 | ### Details 249 | While this setting is enabled, the collision of dragged parts is determined by 250 | the bounding box formed by the entire selection. While disabled, collisions are 251 | performed on each selection individually. 252 | 253 | ## Enable Autocomplete 254 | [EA]: member:Enable%20Autocomplete 255 | 256 | Determines whether code completion is enabled while typing in the script editor 257 | or command bar. 258 | 259 | ### Details 260 | When the user types in the script editor or command bar while this setting is 261 | enabled, a menu will pop up next to the cursor, displaying a list of words 262 | relevant to the context of what has been typed. `ctrl+space` can also be used to 263 | display the menu. While displayed, the up and down arrow keys can be used to 264 | highlight an element, or the user may continue typing to further reduce the 265 | list. When the user presses enter on a highlighted element, the rest of the 266 | typed word will be filled in with that element. 267 | 268 | Several kinds of elements can be completed: 269 | 270 | - Lua keywords. 271 | - built-in shared variables. 272 | - Local and global variables. 273 | - Indices of such variables, including members and children of objects. 274 | 275 | Variables that cannot be inferred statically cannot be completed. For example, a 276 | function parameter can have an arbitrary value passed to it, so its value can 277 | only be determined at runtime when the function is actually called. 278 | 279 | ## Enable CoreScript Debugger 280 | [ECSD]: member:Enable%20CoreScript%20Debugger 281 | 282 | ## Enable Intellisense 283 | [EI]: member:Enable%20Intellisense 284 | 285 | Replaced by [Enable Autocomplete][EA]. 286 | 287 | ## Error Color 288 | [EC]: member:Error%20Color 289 | 290 | Determines the color of text decorations indicating an error in the script 291 | editor. 292 | 293 | ## Find Selection Background Color 294 | [FSBC]: member:Find%20Selection%20Background%20Color 295 | 296 | Determines the background color of text highlighted by the Find action. 297 | 298 | ## Font 299 | [Font]: member:Font 300 | 301 | Determines the script editor font. 302 | 303 | ## GetAvailableThemes 304 | [GAT]: member:GetAvailableThemes 305 | 306 | Returns available studio themes as a list of [StudioThemes](class:StudioTheme) 307 | objects. 308 | 309 | ## Hover Animate Speed 310 | [HAS]: member:Hover%20Animate%20Speed 311 | 312 | Determines the speed at which the hover-over box animates. 313 | 314 | ### Details 315 | See [Show Hover Over][SHO] for a description of the hover-over box. 316 | 317 | This setting determines the rate at which the color of the hover-over box 318 | transitions between the [Select Color][SelectColor] and the [Hover Over 319 | Color][HOC]. 320 | 321 | ## Hover Over Color 322 | [HOC]: member:Hover%20Over%20Color 323 | 324 | Determines the secondary color of the hover-over box. 325 | 326 | ### Details 327 | See [Show Hover Over][SHO] for a description of the hover-over box. 328 | 329 | When [Hover Animate Speed][HAS] is enabled, the hover-over box will transition 330 | between the [Select Color][SelectColor] and this color. 331 | 332 | ## Keyword Color 333 | [KC]: member:Keyword%20Color 334 | 335 | Determines the color of Lua keywords in the script editor. 336 | 337 | ## Language 338 | [Language]: member:Language 339 | 340 | Determines the language displayed in the Studio interface. 341 | 342 | ### Details 343 | Studio must be restarted for changes to this setting to take effect. 344 | 345 | ## Line Thickness 346 | [LT]: member:Line%20Thickness 347 | 348 | Determines the thickness, in studs, of the box displayed around the 349 | [PrimaryPart](class:Model/PrimaryPart) while a [Model](class:Model) is selected. 350 | 351 | ### Details 352 | The value has an interval of `(0, 0.05)`, or a minimum limit of 0 exclusive, and 353 | a maximum limit of 0.05 exclusive. 354 | 355 | #### Bugs 356 | Setting the value to 0 will display the error used for the maximum limit, rather 357 | than the minimum. 358 | 359 | ## LuaDebuggerEnabled 360 | [LDE]: member:LuaDebuggerEnabled 361 | 362 | Determines whether the Lua debugger is enabled or disabled when Studio starts 363 | up. 364 | 365 | ### Details 366 | Studio must be restarted for changes to the debugger to take effect. 367 | 368 | ## LuaDebuggerEnabledAtStartup 369 | [LDEAS]: member:LuaDebuggerEnabledAtStartup 370 | 371 | Returns whether the Lua debugger is currently enabled. 372 | 373 | ### Details 374 | This value indicates the enabled state of the debugger in the current session, 375 | regardless of the value of [LuaDebuggerEnabled][LDE]. 376 | 377 | ## Matching Word Background Color 378 | [MWBC]: member:Matching%20Word%20Background%20Color 379 | 380 | Determines the background color of matched words in the script editor. 381 | 382 | ### Details 383 | When a word is selected in the script editor while this setting is enabled, 384 | other occurrences of the word in the script will be highlighted with this color. 385 | 386 | ## Maximum Output Lines 387 | [MOL]: member:Maximum%20Output%20Lines 388 | 389 | Determines the number of lines that persist in the Output panel. 390 | 391 | ### Details 392 | A value of 0 or less causes no limit to be enforced. When set to a value less 393 | than the current, the oldest lines in the Output panel will be truncated. 394 | 395 | ## Number Color 396 | [NC]: member:Number%20Color 397 | 398 | Determines the color of Lua numbers in the script editor. 399 | 400 | ## Only Play Audio from Window in Focus 401 | [OPAfWiF]: member:Only%20Play%20Audio%20from%20Window%20in%20Focus 402 | 403 | Determines whether audio will be played only from the Studio window currently in 404 | focus. 405 | 406 | ## Operator Color 407 | [OC]: member:Operator%20Color 408 | 409 | Determines the color of Lua operators in the script editor. 410 | 411 | ## Output Font 412 | [OutputFont]: member:Output%20Font 413 | 414 | Determines the Output panel font. 415 | 416 | ## Output Layout Mode 417 | [OLM]: member:Output%20Layout%20Mode 418 | 419 | Determines the layout of vertical panels versus horizontal panels. 420 | 421 | ### Details 422 | When set to Vertical, panels on the left and right sides of the screen will be 423 | laid out with priority over panels on the bottom of the screen. When set to 424 | Horizontal, panels on the bottom of the screen will have priority. 425 | 426 | ## OverrideCoreScripts 427 | [OCS]: member:OverrideCoreScripts 428 | 429 | ## OverrideCoreScriptsDir 430 | [OCSD]: member:OverrideCoreScriptsDir 431 | 432 | ## PermissionLevelShown 433 | [PLS]: member:PermissionLevelShown 434 | 435 | ## PluginsDir 436 | [PD]: member:PluginsDir 437 | 438 | ## Preprocessor Color 439 | [PC]: member:Preprocessor%20Color 440 | 441 | The determines the color of preprocessors in the script editor. 442 | 443 | ### Details 444 | Older versions of Lua (up to 3.2) had a 445 | [preprocessor](https://www.lua.org/manual/3.2/manual.html#4.2), in which lines 446 | beginning with a `$` character were interpreted as directives. The preprocessor 447 | was removed in version 4.0, so this value is unused. 448 | 449 | ## RecentSavesDir 450 | [RSD]: member:RecentSavesDir 451 | 452 | ## Render Throttle Percentage 453 | [RTP]: member:Render%20Throttle%20Percentage 454 | 455 | ## Respect Studio shortcuts when game has focus 456 | [RSswghf]: member:Respect%20Studio%20shortcuts%20when%20game%20has%20focus 457 | 458 | ## RuntimeUndoBehavior 459 | [RUB]: member:RuntimeUndoBehavior 460 | 461 | ## ScriptTimeoutLength 462 | [STL]: member:ScriptTimeoutLength 463 | 464 | ## Select Color 465 | [SelectColor]: member:Select%20Color 466 | 467 | Determines the color of selection boxes, as well as the hover-over box. 468 | 469 | ### Details 470 | While an object in the viewport is selected, a bounding-box will be displayed 471 | around it. Select Color determines the color of this box. 472 | 473 | When [Hover Animate Speed][HAS] is enabled, the hover-over box will transition 474 | between the this color and the [Hover Over Color][HOC]. See [Show Hover 475 | Over][SHO] for a description of the hover-over box. 476 | 477 | ## Select/Hover Color 478 | [SHC]: member:Select%2FHover%20Color 479 | 480 | Determines the color of the box displayed around the 481 | [PrimaryPart](class:Model/PrimaryPart) while a [Model](class:Model) is selected. 482 | 483 | ## Selection Background Color 484 | [SBC]: member:Selection%20Background%20Color 485 | 486 | Determines the background color of selected text in the script editor. 487 | 488 | ## Selection Color 489 | [SionC]: member:Selection%20Color 490 | 491 | Determines the color of selected text in the script editor. 492 | 493 | ## Server Audio Behavior 494 | [SAB]: member:Server%20Audio%20Behavior 495 | 496 | ## Show Core GUI in Explorer while Playing 497 | [SCGiEwP]: member:Show%20Core%20GUI%20in%20Explorer%20while%20Playing 498 | 499 | ## Show Diagnostics Bar 500 | [SDB]: member:Show%20Diagnostics%20Bar 501 | 502 | ## Show Hidden Objects in Explorer 503 | [SHOiE]: member:Show%20Hidden%20Objects%20in%20Explorer 504 | 505 | ## Show Hover Over 506 | [SHO]: member:Show%20Hover%20Over 507 | 508 | Sets whether selectable objects in the viewport show an indicator when hovered 509 | over with the mouse. 510 | 511 | ### Details 512 | When the mouse hovers over a selectable 3D object in the viewport while this 513 | setting is enabled, a "hover-over" selection box will be shown around the 514 | object. The appearance of this box can be configured with the following 515 | settings: 516 | 517 | - [Animate Hover Over][AHO] 518 | - [Hover Animate Speed][HAS] 519 | - [Select Color][SelectColor] 520 | - [Hover Over Color][HOC] 521 | 522 | ## Show Navigation Mesh 523 | [SNM]: member:Show%20Navigation%20Mesh 524 | 525 | ## Show Plugin GUI Service in Explorer 526 | [SPGSiE]: member:Show%20Plugin%20GUI%20Service%20in%20Explorer 527 | 528 | ## Show plus button on hover in Explorer 529 | [SpbohiE]: member:Show%20plus%20button%20on%20hover%20in%20Explorer 530 | 531 | ## Show QT warnings in output 532 | [SQwio]: member:Show%20QT%20warnings%20in%20output 533 | 534 | ## Show Roblox Plugin GUI Service in Explorer 535 | [SRPGSiE]: member:Show%20Roblox%20Plugin%20GUI%20Service%20in%20Explorer 536 | 537 | ## Skip Closing Brackets and Quotes 538 | [SCBaQ]: member:Skip%20Closing%20Brackets%20and%20Quotes 539 | 540 | Determines whether automatically inserted characters are skipped over while 541 | typing. 542 | 543 | ### Details 544 | When typing in the script editor while this setting is enabled, if the typed 545 | character is a closing bracket or quote that equals the next character after the 546 | cursor, and the character has a matching opening character, then the cursor 547 | moves one character forward instead of typing. 548 | 549 | This is used in conjunction with [Auto Closing Brackets][ACB] and [Auto Closing 550 | Quotes][ACQ] to skip over characters that have been inserted automatically. 551 | 552 | ## String Color 553 | [StringColor]: member:String%20Color 554 | 555 | Determines the color of Lua strings in the script editor. 556 | 557 | ## Tab Width 558 | [TabWidth]: member:Tab%20Width 559 | 560 | ## Text Color 561 | [TextColor]: member:Text%20Color 562 | 563 | Determines the color of general text in the script editor. 564 | 565 | ## Text Wrapping 566 | [TextWrapping]: member:Text%20Wrapping 567 | 568 | ## Theme 569 | [Theme]: member:Theme 570 | 571 | Determines the current studio theme. 572 | 573 | ### Details 574 | Theme expects a [StudioTheme](class:StudioTheme) object. A list of available 575 | themes can be acquired with [GetAvailableThemes][GAT]. 576 | 577 | ## ThemeChanged 578 | [ThemeChanged]: member:ThemeChanged 579 | 580 | Fires after the [Theme][Theme] property changes. 581 | 582 | ### Details 583 | 584 | ## UI Theme 585 | [UT]: member:UI%20Theme 586 | 587 | ## Warning Color 588 | [WC]: member:Warning%20Color 589 | 590 | Determines the color of text decorations indicating a warning in the script 591 | editor. 592 | -------------------------------------------------------------------------------- /src/doc/en/api/class/StudioService.md: -------------------------------------------------------------------------------- 1 | # Members 2 | 3 | ## GetClassIcon 4 | Gets the explorer icon for a given class. 5 | 6 | ### Details 7 | GetClassIcon returns the icon for a class as displayed in Studio's explorer 8 | panel. *className* is the name of an existing Roblox class. If successful, a 9 | table with the following fields is returned: 10 | 11 | - **Image**: [string](type:string) 12 | - **ImageRectOffset**: [Vector2](type:Vector2) 13 | - **ImageRectSize**: [Vector2](type:Vector2) 14 | 15 | These correspond to the [Image](class:ImageLabel/Image), 16 | [ImageRectOffset](class:ImageLabel/ImageRectOffset), and 17 | [ImageRectSize](class:ImageLabel/ImageRectSize) properties of an 18 | [ImageLabel](class:ImageLabel) or [ImageButton](class:ImageButton). The values 19 | of each fields can be set directly to its corresponding property to display the 20 | icon correctly. 21 | 22 | If the given class does not exist, then following error is thrown: 23 | 24 | GetClassIcon: CLASS is not a Roblox class. 25 | 26 | Where `CLASS` is the value of the given *className*. 27 | 28 | ### Examples 29 | Generate a GUI displaying the entire game tree. 30 | 31 | ```lua 32 | local StudioService = game:GetService("StudioService") 33 | local TextService = game:GetService("TextService") 34 | local StarterGui = game:GetService("StarterGui") 35 | 36 | -- Get base size of icon, assuming all icons have the same size. 37 | local iconSize = StudioService:GetClassIcon("Instance").ImageRectSize 38 | local font = Enum.Font.SourceSans 39 | local fontSize = iconSize.Y 40 | local labelTextOffset = 2 41 | 42 | -- Create label template. 43 | local labelTemplate = Instance.new("Frame") 44 | labelTemplate.Name = "ClassLabel" 45 | labelTemplate.BackgroundTransparency = 1 46 | 47 | local iconTemplate = Instance.new("ImageLabel", labelTemplate) 48 | iconTemplate.Name = "IconLabel" 49 | iconTemplate.Size = UDim2.new(0, iconSize.X, 0, iconSize.Y) 50 | iconTemplate.BackgroundTransparency = 1 51 | 52 | local textTemplate = Instance.new("TextLabel", labelTemplate) 53 | textTemplate.Name = "TextLabel" 54 | textTemplate.Position = UDim2.new(0, iconSize.X + labelTextOffset, 0, 0) 55 | textTemplate.TextXAlignment = Enum.TextXAlignment.Left 56 | textTemplate.BackgroundTransparency = 1 57 | textTemplate.TextColor3 = Color3.new(1, 1, 1) 58 | 59 | -- Generate labels. 60 | local maxWidth = 0 61 | local labels = {} 62 | local function createLabels(objects, depth) 63 | for i, object in pairs(objects) do 64 | -- Some objects are not friendly to being indexed. 65 | local ok, name = pcall(function() return object.Name end) 66 | if ok and object.ClassName ~= "" then 67 | local icon = StudioService:GetClassIcon(object.ClassName) 68 | local textSize = TextService:GetTextSize(name, fontSize, font, Vector2.new(0, 0)) 69 | local label = labelTemplate:Clone() 70 | label.Position = UDim2.new(0, depth * iconSize.X, 0, #labels * iconSize.Y) 71 | label.Size = UDim2.new(0, iconSize.X + textSize.X + labelTextOffset, 0, iconSize.Y) 72 | label.IconLabel.Image = icon.Image 73 | label.IconLabel.ImageRectOffset = icon.ImageRectOffset 74 | label.IconLabel.ImageRectSize = icon.ImageRectSize 75 | label.TextLabel.Text = name 76 | label.TextLabel.Size = UDim2.new(0, textSize.X, 0, iconSize.Y) 77 | local width = label.Position.X.Offset + label.Size.X.Offset 78 | if width > maxWidth then 79 | maxWidth = width 80 | end 81 | labels[#labels + 1] = label 82 | createLabels(object:GetChildren(), depth + 1) 83 | end 84 | end 85 | end 86 | createLabels(game:GetChildren(), 0) 87 | 88 | -- Generate GUI. 89 | local screen = Instance.new("ScreenGui") 90 | local container = Instance.new("ScrollingFrame", screen) 91 | local width = maxWidth + container.ScrollBarThickness 92 | container.Position = UDim2.new(0, 10, 0, 10) 93 | container.Size = UDim2.new(0, width, 1, -20) 94 | container.CanvasSize = UDim2.new(0, width, 0, #labels * iconSize.Y) 95 | container.BackgroundColor3 = Color3.new(0, 0, 0) 96 | container.BackgroundTransparency = 0.3 97 | container.BorderSizePixel = 0 98 | for _, label in pairs(labels) do 99 | label.Parent = container 100 | end 101 | screen.Parent = game.StarterGui 102 | ``` 103 | -------------------------------------------------------------------------------- /src/doc/en/api/enum/EnviromentalPhysicsThrottle.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Determines how physics simulation is throttled. 100% is the normal simulation 3 | rate. 4 | 5 | # Members 6 | 7 | ## DefaultAuto 8 | Throttling determined dynamically. 9 | 10 | ### Details 11 | Throttling is determined by the amount of work required to simulate physics. For 12 | heavy simulations, smoother framerates are maintained at the cost of a slower 13 | simulation. 14 | 15 | ## Disabled 16 | Throttling is 100%. 17 | 18 | ## Always 19 | Throttling is 0%. 20 | 21 | ## Skip2 22 | Throttling is 50%. 23 | 24 | ## Skip4 25 | Throttling is 25%. 26 | 27 | ## Skip8 28 | Throttling is 12.5%. 29 | 30 | ## Skip16 31 | Throttling is 6.25%. 32 | -------------------------------------------------------------------------------- /src/doc/en/api/enum/HoverAnimateSpeed.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Determines the speed at which the hover-over box animates. 3 | 4 | # Details 5 | The hover-over box cycles between two colors at a rate determined by 6 | HoverAnimateSpeed. See [Show Hover Over](class:Studio/Show%20Hover%20Over) for a 7 | description of the hover-over box. 8 | 9 | # Members 10 | 11 | ## Fast 12 | Cycles 2 times per second. 13 | 14 | ## Medium 15 | Cycles once every second. 16 | 17 | ## Slow 18 | Cycles once every 2 seconds. 19 | 20 | ## VeryFast 21 | Cycles 4 times per second. 22 | 23 | ## VerySlow 24 | Cycles once every 4 seconds. 25 | -------------------------------------------------------------------------------- /src/doc/en/api/enum/InputType.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Controls the behavior of [BasePart](class:BasePart) SurfaceInputs. 3 | 4 | # Details 5 | InputType determines how the ParamA and ParamB properties of a BasePart are 6 | used. 7 | 8 | # Members 9 | 10 | ## NoInput 11 | Causes a surface motor to remain stationary. 12 | 13 | ## Constant 14 | Causes a surface motor to rotate at a constant velocity. 15 | 16 | ### Details 17 | The angular velocity of the rotation is calculated according to the following 18 | formula (in radians): 19 | 20 | ParamB * math.rad(31) 21 | 22 | ## Sin 23 | Causes a surface motor to rotate according to a sine wave. 24 | 25 | ### Details 26 | The angular velocity of the rotation is calculated according to the following 27 | formula (in radians): 28 | 29 | ParamA * math.sin(time() * ParamB) * math.rad(31) 30 | 31 | ## Throtle 32 | Replaced by Throttle. 33 | -------------------------------------------------------------------------------- /src/doc/en/api/enum/StudioStyleGuideColor.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Indicates a Studio widget or element with a particular color. 3 | 4 | # Details 5 | Each Studio theme has a color for each item, as well as a number of modifiers 6 | corresponding to [StudioStyleGuideModifier][SSGM]. The color of an item can be 7 | retrieved with [StudioTheme.GetColor](class:StudioTheme/GetColor). 8 | 9 | The following table lists, for each theme, the current colors and their 10 | variations: 11 | 12 | [SSGM]: enum:StudioStyleGuideModifier 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 |
ItemLightDark
MainBackground
Titlebar
Dropdown
Tooltip
Notification
ScrollBar
ScrollBarBackground
TabBar
Tab
RibbonTab
RibbonTabTopBar
Button
MainButton
RibbonButton
ViewPortBackground
InputFieldBackground
Item
TableItem
CategoryItem
GameSettingsTableItem
GameSettingsTooltip
EmulatorBar
EmulatorDropDown
ColorPickerFrame
CurrentMarker
Border
Shadow
Light
Dark
Mid
MainText
SubText
TitlebarText
BrightText
DimmedText
LinkText
WarningText
ErrorText
InfoText
SensitiveText
ScriptSideWidget
ScriptBackground
ScriptText
ScriptSelectionText
ScriptSelectionBackground
ScriptFindSelectionBackground
ScriptMatchingWordSelectionBackground
ScriptOperator
ScriptNumber
ScriptString
ScriptComment
ScriptPreprocessor
ScriptKeyword
ScriptBuiltInFunction
ScriptWarning
ScriptError
DebuggerCurrentLine
DebuggerErrorLine
DiffFilePathText
DiffTextHunkInfo
DiffTextNoChange
DiffTextAddition
DiffTextDeletion
DiffTextSeparatorBackground
DiffTextNoChangeBackground
DiffTextAdditionBackground
DiffTextDeletionBackground
DiffLineNum
DiffLineNumSeparatorBackground
DiffLineNumNoChangeBackground
DiffLineNumAdditionBackground
DiffLineNumDeletionBackground
DiffFilePathBackground
DiffFilePathBorder
Separator
ButtonBorder
ButtonText
InputFieldBorder
CheckedFieldBackground
CheckedFieldBorder
CheckedFieldIndicator
HeaderSection
Midlight
StatusBar
DialogButton
DialogButtonText
DialogButtonBorder
DialogMainButton
DialogMainButtonText
Merge3HighlightOriginal
Merge3HighlightMine
Merge3HighlightTheirs
111 | 112 | 153 | 154 | # Members 155 | 156 | ## MainBackground 157 | The background for most widgets. 158 | 159 | ## Titlebar 160 | The title bar of panel widgets. 161 | 162 | ## Dropdown 163 | The background of the menu component of a dropdown widget. 164 | 165 | ## Tooltip 166 | The background of a tooltip. 167 | 168 | ## Notification 169 | The background of a notification. 170 | 171 | ## ScrollBar 172 | The thumb component of a scrollbar. 173 | 174 | ## ScrollBarBackground 175 | The track component of a scrollbar. 176 | 177 | ## TabBar 178 | The background of the tab bar that contains tab widgets. 179 | 180 | ## Tab 181 | The background of a tab widget. 182 | 183 | ## RibbonTab 184 | The background of a ribbon tab widget. 185 | 186 | ## RibbonTabTopBar 187 | The bar that appears above a selected ribbon tab. 188 | 189 | ## Button 190 | The background of a button widget. 191 | 192 | ## MainButton 193 | ## RibbonButton 194 | The background of a button widget on the ribbon bar. 195 | 196 | ## ViewPortBackground 197 | ## InputFieldBackground 198 | ## Item 199 | ## TableItem 200 | ## CategoryItem 201 | ## GameSettingsTableItem 202 | ## GameSettingsTooltip 203 | ## EmulatorBar 204 | ## EmulatorDropDown 205 | ## ColorPickerFrame 206 | ## CurrentMarker 207 | ## Border 208 | ## Shadow 209 | ## Light 210 | ## Dark 211 | ## Mid 212 | ## MainText 213 | ## SubText 214 | ## TitlebarText 215 | ## BrightText 216 | ## DimmedText 217 | ## LinkText 218 | Text that has a hyperlink. 219 | 220 | ## WarningText 221 | Text in the output panel that indicates a warning. 222 | 223 | ## ErrorText 224 | Text in the output panel that indicates an error. 225 | 226 | ## InfoText 227 | Text in the output panel that indicates non-printed information. 228 | 229 | ## SensitiveText 230 | Text in the output panel that indicates sensitive information. 231 | 232 | ## ScriptSideWidget 233 | 234 | ## ScriptBackground 235 | Background in the script editor. 236 | 237 | ## ScriptText 238 | Detault text in the script editor. 239 | 240 | ## ScriptSelectionText 241 | Selected text in the script editor. 242 | 243 | ## ScriptSelectionBackground 244 | Background of selected text in the script editor. 245 | 246 | ## ScriptFindSelectionBackground 247 | Background of searched text in the script editor. 248 | 249 | ## ScriptMatchingWordSelectionBackground 250 | Background of words matching selected text in the script editor. 251 | 252 | ## ScriptOperator 253 | Lua operators in the script editor. 254 | 255 | ## ScriptNumber 256 | Lua numbers in the script editor. 257 | 258 | ## ScriptString 259 | Lua strings in the script editor. 260 | 261 | ## ScriptComment 262 | Lua comments in the script editor. 263 | 264 | ## ScriptPreprocessor 265 | Lua preprocessors in the script editor. 266 | 267 | ## ScriptKeyword 268 | Lua keywords in the script editor. 269 | 270 | ## ScriptBuiltInFunction 271 | Lua built-in functions in the script editor. 272 | 273 | ## ScriptWarning 274 | Warning decoration in the script editor. 275 | 276 | ## ScriptError 277 | Error decoration in the script editor. 278 | 279 | ## DebuggerCurrentLine 280 | Background of current debugging line in the script editor. 281 | 282 | ## DebuggerErrorLine 283 | Background of debugging error in the script editor. 284 | 285 | ## DiffFilePathText 286 | ## DiffTextHunkInfo 287 | ## DiffTextNoChange 288 | ## DiffTextAddition 289 | ## DiffTextDeletion 290 | ## DiffTextSeparatorBackground 291 | ## DiffTextNoChangeBackground 292 | ## DiffTextAdditionBackground 293 | ## DiffTextDeletionBackground 294 | ## DiffLineNum 295 | ## DiffLineNumSeparatorBackground 296 | ## DiffLineNumNoChangeBackground 297 | ## DiffLineNumAdditionBackground 298 | ## DiffLineNumDeletionBackground 299 | ## DiffFilePathBackground 300 | ## DiffFilePathBorder 301 | ## Separator 302 | ## ButtonBorder 303 | ## ButtonText 304 | ## InputFieldBorder 305 | ## CheckedFieldBackground 306 | ## CheckedFieldBorder 307 | ## CheckedFieldIndicator 308 | ## HeaderSection 309 | ## Midlight 310 | ## StatusBar 311 | ## DialogButton 312 | ## DialogButtonText 313 | ## DialogButtonBorder 314 | ## DialogMainButton 315 | ## DialogMainButtonText 316 | ## Merge3HighlightOriginal 317 | ## Merge3HighlightMine 318 | ## Merge3HighlightTheirs 319 | -------------------------------------------------------------------------------- /src/doc/en/api/type/Axes.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Represents a set of coordinate axes that are considered active. 3 | 4 | # Constructors 5 | 6 | ## `Axes.new(components: ...Variant)` 7 | All components of Axes are initialized to false. A variable list of arguments is 8 | received, but only the first 6 arguments are traversed. When an 9 | [Axis](enum:Axis) or [NormalId](enum:NormalId) value is received, the component 10 | of Axes corresponding to the value is set to true. Other values are ignored. 11 | 12 | Value | Component 13 | ---------------------------------------------|---------- 14 | [Enum.Axis.X](enum:Axis/X) | Enables the [X](#doc-field-X) component. 15 | [Enum.Axis.Y](enum:Axis/X) | Enables the [Y](#doc-field-Y) component. 16 | [Enum.Axis.Z](enum:Axis/X) | Enables the [Z](#doc-field-Z) component. 17 | [Enum.NormalId.Right](enum:NormalId/Right) | Enables the [X](#doc-field-X) component. 18 | [Enum.NormalId.Top](enum:NormalId/Top) | Enables the [Y](#doc-field-Y) component. 19 | [Enum.NormalId.Back](enum:NormalId/Back) | Enables the [Z](#doc-field-Z) component. 20 | [Enum.NormalId.Left](enum:NormalId/Left) | Enables the [X](#doc-field-X) component. 21 | [Enum.NormalId.Bottom](enum:NormalId/Bottom) | Enables the [Y](#doc-field-Y) component. 22 | [Enum.NormalId.Front](enum:NormalId/Front) | Enables the [Z](#doc-field-Z) component. 23 | 24 | # Fields 25 | 26 | ## `Back: boolean` 27 | Whether the back face is enabled. Corresponds to the Z axis. 28 | 29 | ## `Bottom: boolean` 30 | Whether the bottom face is enabled. Corresponds to the Y axis. 31 | 32 | ## `Front: boolean` 33 | Whether the frony face is enabled. Corresponds to the Z axis. 34 | 35 | ## `Left: boolean` 36 | Whether the left face is enabled. Corresponds to the X axis. 37 | 38 | ## `Right: boolean` 39 | Whether the right face is enabled. Corresponds to the X axis. 40 | 41 | ## `Top: boolean` 42 | Whether the top face is enabled. Corresponds to the Y axis. 43 | 44 | ## `X: boolean` 45 | Whether the X axis is enabled. 46 | 47 | ## `Y: boolean` 48 | Whether the Y axis is enabled. 49 | 50 | ## `Z: boolean` 51 | Whether the Z axis is enabled. 52 | 53 | # Operators 54 | 55 | ## `Axes == Axes` 56 | Determines whether Axes values are equal. 57 | 58 | ### Details 59 | An Axes is equal to another Axes if their X, Y, and Z fields are equal. 60 | -------------------------------------------------------------------------------- /src/doc/en/api/type/BrickColor.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Represents a color from a predefined collection. 3 | 4 | ## Details 5 | The following **BrickColor table** lists the defined colors: 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 |
NumberNameColor (rgb)Color (hex)ColorPalette IndexNotes
1White 242, 243, 243#F2F3F3
87
2Grey 161, 165, 162#A1A5A2
3Light yellow 249, 233, 153#F9E999
5Brick yellow 215, 197, 154#D7C59A
109
6Light green (Mint) 194, 218, 184#C2DAB8
9Light reddish violet 232, 186, 200#E8BAC8
88
11Pastel Blue 128, 187, 219#80BBDB
51
12Light orange brown 203, 132, 66#CB8442
18Nougat 204, 142, 105#CC8E69
110
21Bright red 196, 40, 28#C4281C
68
22Med. reddish violet 196, 112, 160#C470A0
23Bright blue 13, 105, 172#0D69AC
21
24Bright yellow 245, 205, 48#F5CD30
71
25Earth orange 98, 71, 50#624732
26Black 27, 42, 53#1B2A35
3
27Dark grey 109, 110, 108#6D6E6C
28Dark green 40, 127, 71#287F47
8
29Medium green 161, 196, 140#A1C48C
59
36Lig. Yellowich orange 243, 207, 155#F3CF9B
37Bright green 75, 151, 75#4B974B
25
38Dark orange 160, 95, 53#A05F35
119
39Light bluish violet 193, 202, 222#C1CADE
40Transparent 236, 236, 236#ECECEC
41Tr. Red 205, 84, 75#CD544B
42Tr. Lg blue 193, 223, 240#C1DFF0
43Tr. Blue 123, 182, 232#7BB6E8
44Tr. Yellow 247, 241, 141#F7F18D
45Light blue 180, 210, 228#B4D2E4
63
47Tr. Flu. Reddish orange 217, 133, 108#D9856C
48Tr. Green 132, 182, 141#84B68D
49Tr. Flu. Green 248, 241, 132#F8F184
50Phosph. White 236, 232, 222#ECE8DE
100Light red 238, 196, 182#EEC4B6
101Medium red 218, 134, 122#DA867A
101
102Medium blue 110, 153, 202#6E99CA
20
103Light grey 199, 193, 183#C7C1B7
104Bright violet 107, 50, 124#6B327C
44
105Br. yellowish orange 226, 155, 64#E29B40
94
106Bright orange 218, 133, 65#DA8541
83
107Bright bluish green 0, 143, 156#008F9C
2
108Earth yellow 104, 92, 67#685C43
110Bright bluish violet 67, 84, 147#435493
111Tr. Brown 191, 183, 177#BFB7B1
112Medium bluish violet 104, 116, 172#6874AC
113Tr. Medi. reddish violet229, 173, 200#E5ADC8
115Med. yellowish green 199, 210, 60#C7D23C
116Med. bluish green 85, 165, 175#55A5AF
118Light bluish green 183, 215, 213#B7D7D5
119Br. yellowish green 164, 189, 71#A4BD47
46
120Lig. yellowish green 217, 228, 167#D9E4A7
121Med. yellowish orange 231, 172, 88#E7AC58
123Br. reddish orange 211, 111, 76#D36F4C
124Bright reddish violet 146, 57, 120#923978
125Light orange 234, 184, 146#EAB892
100
126Tr. Bright bluish violet165, 165, 203#A5A5CB
127Gold 220, 188, 129#DCBC81
Shares Name with 333 (BrickColor.new returns 333)
128Dark nougat 174, 122, 89#AE7A59
131Silver 156, 163, 168#9CA3A8
133Neon orange 213, 115, 61#D5733D
82
134Neon green 216, 221, 86#D8DD56
135Sand blue 116, 134, 157#74869D
19
136Sand violet 135, 124, 144#877C90
137Medium orange 224, 152, 100#E09864
138Sand yellow 149, 138, 115#958A73
140Earth blue 32, 58, 86#203A56
141Earth green 39, 70, 45#27462D
0
143Tr. Flu. Blue 207, 226, 247#CFE2F7
145Sand blue metallic 121, 136, 161#7988A1
146Sand violet metallic 149, 142, 163#958EA3
147Sand yellow metallic 147, 135, 103#938767
148Dark grey metallic 87, 88, 87#575857
149Black metallic 22, 29, 50#161D32
150Light grey metallic 171, 173, 172#ABADAC
151Sand green 120, 144, 130#789082
34
153Sand red 149, 121, 119#957977
114
154Dark red 123, 46, 47#7B2E2F
157Tr. Flu. Yellow 255, 246, 123#FFF67B
158Tr. Flu. Red 225, 164, 194#E1A4C2
168Gun metallic 117, 108, 98#756C62
176Red flip/flop 151, 105, 91#97695B
178Yellow flip/flop 180, 132, 85#B48455
179Silver flip/flop 137, 135, 136#898788
180Curry 215, 169, 75#D7A94B
190Fire Yellow 249, 214, 46#F9D62E
191Flame yellowish orange 232, 171, 45#E8AB2D
192Reddish brown 105, 64, 40#694028
103
193Flame reddish orange 207, 96, 36#CF6024
194Medium stone grey 163, 162, 165#A3A2A5
123
195Royal blue 70, 103, 164#4667A4
196Dark Royal blue 35, 71, 139#23478B
198Bright reddish lilac 142, 66, 133#8E4285
199Dark stone grey 99, 95, 98#635F62
122
200Lemon metalic 130, 138, 93#828A5D
208Light stone grey 229, 228, 223#E5E4DF
62
209Dark Curry 176, 142, 68#B08E44
210Faded green 112, 149, 120#709578
211Turquoise 121, 181, 181#79B5B5
212Light Royal blue 159, 195, 233#9FC3E9
213Medium Royal blue 108, 129, 183#6C81B7
216Rust 144, 76, 42#904C2A
Shares Name with 345 (BrickColor.new returns 345)
217Brown 124, 92, 70#7C5C46
111
218Reddish lilac 150, 112, 159#96709F
219Lilac 107, 98, 155#6B629B
Shares Name with 321 (BrickColor.new returns 321)
220Light lilac 167, 169, 206#A7A9CE
221Bright purple 205, 98, 152#CD6298
222Light purple 228, 173, 200#E4ADC8
223Light pink 220, 144, 149#DC9095
224Light brick yellow 240, 213, 160#F0D5A0
225Warm yellowish orange 235, 184, 127#EBB87F
226Cool yellow 253, 234, 141#FDEA8D
73
232Dove blue 125, 187, 221#7DBBDD
268Medium lilac 52, 43, 117#342B75
301Slime green 80, 109, 84#506D54
1
302Smoky grey 91, 93, 105#5B5D69
10
303Dark blue 0, 16, 176#0010B0
5
304Parsley green 44, 101, 29#2C651D
7
305Steel blue 82, 124, 174#527CAE
11
306Storm blue 51, 88, 130#335882
12
307Lapis 16, 42, 220#102ADC
13
308Dark indigo 61, 21, 133#3D1585
14
309Sea green 52, 142, 64#348E40
16
310Shamrock 91, 154, 76#5B9A4C
17
311Fossil 159, 161, 172#9FA1AC
29
312Mulberry 89, 34, 89#592259
23
313Forest green 31, 128, 29#1F801D
24
314Cadet blue 159, 173, 192#9FADC0
39
315Electric blue 9, 137, 207#0989CF
30
316Eggplant 123, 0, 123#7B007B
33
317Moss 124, 156, 107#7C9C6B
35
318Artichoke 138, 171, 133#8AAB85
36
319Sage green 185, 196, 177#B9C4B1
37
320Ghost grey 202, 203, 209#CACBD1
50
321Lilac 167, 94, 155#A75E9B
42Shares Name with 219 (BrickColor.new returns 321)
322Plum 123, 47, 123#7B2F7B
43
323Olivine 148, 190, 129#94BE81
47
324Laurel green 168, 189, 153#A8BD99
48
325Quill grey 223, 223, 222#DFDFDE
49
327Crimson 151, 0, 0#970000
56
328Mint 177, 229, 166#B1E5A6
60
329Baby blue 152, 194, 219#98C2DB
64
330Carnation pink 255, 152, 220#FF98DC
65
331Persimmon 255, 89, 89#FF5959
66
332Maroon 117, 0, 0#750000
69
333Gold 239, 184, 56#EFB838
70Shares Name with 127 (BrickColor.new returns 333)
334Daisy orange 248, 217, 109#F8D96D
72
335Pearl 231, 231, 236#E7E7EC
75
336Fog 199, 212, 228#C7D4E4
76
337Salmon 255, 148, 148#FF9494
90
338Terra Cotta 190, 104, 98#BE6862
79
339Cocoa 86, 36, 36#562424
81
340Wheat 241, 231, 199#F1E7C7
84
341Buttermilk 254, 243, 187#FEF3BB
85
342Mauve 224, 178, 208#E0B2D0
77
343Sunrise 212, 144, 189#D490BD
78
344Tawny 150, 85, 85#965555
91
345Rust 143, 76, 42#8F4C2A
92Shares Name with 216 (BrickColor.new returns 345)
346Cashmere 211, 190, 150#D3BE96
95
347Khaki 226, 220, 188#E2DCBC
96
348Lily white 237, 234, 234#EDEAEA
97
349Seashell 233, 218, 218#E9DADA
98
350Burgundy 136, 62, 62#883E3E
102
351Cork 188, 155, 93#BC9B5D
104
352Burlap 199, 172, 120#C7AC78
105
353Beige 202, 191, 163#CABFA3
106
354Oyster 187, 179, 178#BBB3B2
107
355Pine Cone 108, 88, 75#6C584B
112
356Fawn brown 160, 132, 79#A0844F
113
357Hurricane grey 149, 137, 136#958988
115
358Cloudy grey 171, 168, 158#ABA89E
116
359Linen 175, 148, 131#AF9483
117
360Copper 150, 103, 102#966766
118
361Dirt brown 86, 66, 54#564236
120
362Bronze 126, 104, 63#7E683F
121
363Flint 105, 102, 92#69665C
124
364Dark taupe 90, 76, 66#5A4C42
125
365Burnt Sienna 106, 57, 9#6A3909
126
1001Institutional white 248, 248, 248#F8F8F8
86
1002Mid gray 205, 205, 205#CDCDCD
108
1003Really black 17, 17, 17#111111
127
1004Really red 255, 0, 0#FF0000
67
1005Deep orange 255, 176, 0#FFB000
57Shares Name with 1017 (BrickColor.new returns 1005)
1006Alder 180, 128, 255#B480FF
41
1007Dusty Rose 163, 75, 75#A34B4B
80
1008Olive 193, 190, 66#C1BE42
45
1009New Yeller 255, 255, 0#FFFF00
58
1010Really blue 0, 0, 255#0000FF
22
1011Navy blue 0, 32, 96#002060
6
1012Deep blue 33, 84, 185#2154B9
4
1013Cyan 4, 175, 236#04AFEC
40
1014CGA brown 170, 85, 0#AA5500
93
1015Magenta 170, 0, 170#AA00AA
55
1016Pink 255, 102, 204#FF66CC
53
1017Deep orange 255, 175, 0#FFAF00
Shares Name with 1005 (BrickColor.new returns 1005)
1018Teal 18, 238, 212#12EED4
9
1019Toothpaste 0, 255, 255#00FFFF
18
1020Lime green 0, 255, 0#00FF00
27
1021Camo 58, 125, 21#3A7D15
15
1022Grime 127, 142, 100#7F8E64
26
1023Lavender 140, 91, 159#8C5B9F
31
1024Pastel light blue 175, 221, 255#AFDDFF
38
1025Pastel orange 255, 201, 201#FFC9C9
89
1026Pastel violet 177, 167, 255#B1A7FF
52
1027Pastel blue-green 159, 243, 233#9FF3E9
28
1028Pastel green 204, 255, 204#CCFFCC
61
1029Pastel yellow 255, 255, 204#FFFFCC
74
1030Pastel brown 255, 204, 153#FFCC99
99
1031Royal purple 98, 37, 209#6225D1
32
1032Hot pink 255, 0, 191#FF00BF
54
220 | 221 | [default]: #doc-brickcolor-194 222 | 223 | 319 | 320 | # Constructors 321 | 322 | ## `BrickColor.new(value: number)` 323 | Returns the BrickColor for which the Number matches *value*. 324 | 325 | ### Details 326 | If no BrickColors are matched, then the default [Medium stone grey][default] is 327 | returned. 328 | 329 | ## `BrickColor.new(name: string)` 330 | Returns the BrickColor for which the Name matches *name*. 331 | 332 | ### Details 333 | If no BrickColors are matched, then the default [Medium stone grey][default] is 334 | returned. 335 | 336 | Some colors share the same name. For such cases, the [BrickColor 337 | table](#doc-details) indicates 338 | which color is returned for the given name. 339 | 340 | ## `BrickColor.new(r: number?, g: number?, b: number?)` 341 | Returns the BrickColor nearest to the given color components. 342 | 343 | ### Details 344 | Each parameter defaults to 0. 345 | 346 | "Nearest" is loosely defined. If a given color is nearby multiple BrickColors 347 | within a margin of error, one result should not be expected over another. 348 | 349 | ## `BrickColor.new(color: Color3)` 350 | Returns the BrickColor nearest to the given color. 351 | 352 | ### Details 353 | "Nearest" is loosely defined. If a given color is nearby multiple BrickColors 354 | within a margin of error, one result should not be expected over another. 355 | 356 | ## `BrickColor.palette(index: number)` 357 | Returns a BrickColor from a predefined list of colors. 358 | 359 | ### Details 360 | The "Palette Index" column in the [BrickColor table](#doc-details) indicates the 361 | index of the color in the palette, or that the color is not in the palette, if 362 | empty. 363 | 364 | The palette contains 128 colors. *index* must be between 0 and 127. If *index* 365 | is out of this range, then the following error is thrown: 366 | 367 | palette index out of bounds (INDEX) 368 | 369 | Where `INDEX` is the given value rounded to the nearest integer. 370 | 371 | ## `BrickColor.random()` 372 | Returns a randomly selected BrickColor. 373 | 374 | ## `BrickColor.White()` 375 | Returns the BrickColor [White](#doc-brickcolor-1). 376 | 377 | 379 | 380 | ## `BrickColor.Gray()` 381 | Returns the BrickColor [Medium stone grey](#doc-brickcolor-194). 382 | 383 | ## `BrickColor.DarkGray()` 384 | Returns the BrickColor [Dark stone grey](#doc-brickcolor-199). 385 | 386 | ## `BrickColor.Black()` 387 | Returns the BrickColor [Black](#doc-brickcolor-26). 388 | 389 | ## `BrickColor.Red()` 390 | Returns the BrickColor [Bright red](#doc-brickcolor-21) 391 | 392 | ## `BrickColor.Yellow()` 393 | Returns the BrickColor [Bright yellow](#doc-brickcolor-24). 394 | 395 | ## `BrickColor.Green()` 396 | Returns the BrickColor [Dark green](#doc-brickcolor-28). 397 | 398 | ## `BrickColor.Blue()` 399 | Returns the BrickColor [Bright blue](#doc-brickcolor-23). 400 | 401 | # Fields 402 | 403 | ## `Number: number` 404 | A number that uniquely identifies the BrickColor. 405 | 406 | ## `r: number` 407 | The red component of the BrickColor, between 0 and 1. 408 | 409 | ## `g: number` 410 | The green component of the BrickColor, between 0 and 1. 411 | 412 | ## `b: number` 413 | The blue component of the BrickColor, between 0 and 1. 414 | 415 | ## `Name: string` 416 | The name that describes the BrickColor. 417 | 418 | ## `Color: Color3` 419 | The [Color3](type:Color3) value corresponding to the BrickColor. 420 | 421 | # Operators 422 | 423 | ## `BrickColor == BrickColor` 424 | Determines whether BrickColor values are equal. 425 | 426 | ### Details 427 | A BrickColor is equal to another BrickColor if their Number fields are equal. 428 | -------------------------------------------------------------------------------- /src/doc/en/api/type/Faces.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Represents a set of the six sides of a box that are considered active. 3 | 4 | # Constructors 5 | 6 | ## `Faces.new(faces: ...Variant)` 7 | All components of Faces are initialized to false. A variable list of arguments 8 | is received, but only the first 6 arguments are traversed. When a 9 | [NormalId](enum:NormalId) value is received, the component of Faces 10 | corresponding to the value is set to true. Other values are ignored. 11 | 12 | Value | Component 13 | ---------------------------------------------|---------- 14 | [Enum.NormalId.Right](enum:NormalId/Right) | Enables the [Right](#doc-field-Right) component. 15 | [Enum.NormalId.Top](enum:NormalId/Top) | Enables the [Top](#doc-field-Top) component. 16 | [Enum.NormalId.Back](enum:NormalId/Back) | Enables the [Back](#doc-field-Back) component. 17 | [Enum.NormalId.Left](enum:NormalId/Left) | Enables the [Left](#doc-field-Left) component. 18 | [Enum.NormalId.Bottom](enum:NormalId/Bottom) | Enables the [Bottom](#doc-field-Bottom) component. 19 | [Enum.NormalId.Front](enum:NormalId/Front) | Enables the [Front](#doc-field-Front) component. 20 | 21 | # Fields 22 | 23 | ## `Right: boolean` 24 | A boolean indicating whether the Right face is enabled. 25 | 26 | ## `Top: boolean` 27 | A boolean indicating whether the Top face is enabled. 28 | 29 | ## `Back: boolean` 30 | A boolean indicating whether the Back face is enabled. 31 | 32 | ## `Left: boolean` 33 | A boolean indicating whether the Left face is enabled. 34 | 35 | ## `Bottom: boolean` 36 | A boolean indicating whether the Bottom face is enabled. 37 | 38 | ## `Front: boolean` 39 | A boolean indicating whether the Front face is enabled. 40 | 41 | # Operators 42 | 43 | ## `Faces == Faces` 44 | Determines whether two Faces values are equal. 45 | 46 | ### Details 47 | A Faces value is equal to another Faces value if their Right, Top, Back, Left, 48 | Bottom, and Front fields are equal. 49 | -------------------------------------------------------------------------------- /src/doc/en/api/type/PhysicalProperties.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | Describes the physical aspects of a [BasePart](class:BasePart). 3 | 4 | # Details 5 | 6 | ## Material values 7 | The following table shows the current values for each [Material](enum:Material): 8 | 9 | Name | Density | Friction | Elasticity | FrictionWeight | ElasticityWeight 10 | --------------|---------|----------|------------|----------------|----------------- 11 | Plastic | 0.7 | 0.3 | 0.5 | 1 | 1 12 | Wood | 0.35 | 0.48 | 0.2 | 1 | 1 13 | Slate | 2.691 | 0.4 | 0.2 | 1 | 1 14 | Concrete | 2.403 | 0.7 | 0.2 | 0.3 | 1 15 | CorrodedMetal | 7.85 | 0.7 | 0.2 | 1 | 1 16 | DiamondPlate | 7.85 | 0.35 | 0.25 | 1 | 1 17 | Foil | 2.7 | 0.4 | 0.25 | 1 | 1 18 | Grass | 0.9 | 0.4 | 0.1 | 1 | 1 19 | Ice | 0.919 | 0.02 | 0.15 | 3 | 1 20 | Marble | 2.563 | 0.2 | 0.17 | 1 | 1 21 | Granite | 2.691 | 0.4 | 0.2 | 1 | 1 22 | Brick | 1.922 | 0.8 | 0.15 | 0.3 | 1 23 | Pebble | 2.403 | 0.4 | 0.17 | 1 | 1 24 | Sand | 1.602 | 0.5 | 0.05 | 5 | 1 25 | Fabric | 0.7 | 0.35 | 0.05 | 1 | 1 26 | SmoothPlastic | 0.7 | 0.2 | 0.5 | 1 | 1 27 | Metal | 7.85 | 0.4 | 0.25 | 1 | 1 28 | WoodPlanks | 0.35 | 0.48 | 0.2 | 1 | 1 29 | Cobblestone | 2.691 | 0.5 | 0.17 | 1 | 1 30 | Air | 0.01 | 0.01 | 0.01 | 1 | 1 31 | Water | 1 | 0.005 | 0.01 | 1 | 1 32 | Rock | 2.691 | 0.5 | 0.17 | 1 | 1 33 | Glacier | 0.919 | 0.05 | 0.15 | 1 | 1 34 | Snow | 0.9 | 0.3 | 0.03 | 1 | 1 35 | Sandstone | 2.691 | 0.5 | 0.15 | 5 | 1 36 | Mud | 0.9 | 0.3 | 0.07 | 1 | 1 37 | Basalt | 2.691 | 0.7 | 0.15 | 0.3 | 1 38 | Ground | 0.9 | 0.45 | 0.1 | 1 | 1 39 | CrackedLava | 2.691 | 0.65 | 0.15 | 1 | 1 40 | Neon | 0.7 | 0.3 | 0.2 | 1 | 1 41 | Glass | 2.403 | 0.25 | 0.2 | 1 | 1 42 | Asphalt | 2.36 | 0.8 | 0.2 | 0.3 | 1 43 | LeafyGrass | 0.9 | 0.4 | 0.1 | 1 | 1 44 | Salt | 2.165 | 0.5 | 0.05 | 1 | 1 45 | Limestone | 2.691 | 0.5 | 0.15 | 1 | 1 46 | Pavement | 2.691 | 0.5 | 0.17 | 1 | 1 47 | ForceField | 2.403 | 0.25 | 0.2 | 1 | 1 48 | 49 | 64 | -------------------------------------------------------------------------------- /src/doc/en/api/type/bool.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | A type for representing a Boolean value. 3 | 4 | # Details 5 | The bool type is used to signal one of two distinct options (either `true` or 6 | `false`). Its semantics vary widely depending on the context. 7 | 8 | # Examples 9 | [FindFirstChild](class:Instance/FindFirstChild) has a boolean argument, 10 | *recursive*. When `true`, the method operates recursively: 11 | 12 | ```lua 13 | local folder = Instance.new("Folder") 14 | local middle = Instance.new("Folder", folder) 15 | middle.Name = "Middle" 16 | local inner = Instance.new("Folder", middle) 17 | inner.Name = "Inner" 18 | 19 | print(folder:FindFirstChild("Inner", false)) 20 | --> nil 21 | 22 | print(folder:FindFirstChild("Inner", true)) 23 | --> Inner 24 | ``` 25 | -------------------------------------------------------------------------------- /src/doc/en/api/type/void.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | A stand-in representing no type. 3 | 4 | # Details 5 | The void type is used within the API as the return type of a function to 6 | indicate that no value is returned. 7 | 8 | # Examples 9 | Show that void represents no value, opposed to a nil value. 10 | 11 | ```lua 12 | local value = Instance.new("BoolValue") 13 | print(type(value:FindFirstChild(""))) 14 | --> nil 15 | print(type(value:Destroy())) 16 | --> bad argument #1 to 'type' (value expected) 17 | ``` 18 | -------------------------------------------------------------------------------- /src/doc/en/article/Intervals.md: -------------------------------------------------------------------------------- 1 | # Intervals 2 | A numeric type may be described as having an **interval**. This indicates that 3 | the value lies between a lower and upper bound. 4 | 5 | The notation `(l, u)` indicates an **open** interval, where neither the lower or 6 | upper bounds are included (`l` is the lower bound, and `u` is the upper bound). 7 | The notation `[l, u]` indicates a **closed** interval, where both the lower and 8 | upper bound are included within the interval. `(l, u]` is a **half-open** 9 | interval, where the lower bound is excluded, but the upper bound is included. 10 | `[l, u)` is also half-open, except the lower bound is included, and the upper 11 | bound is excluded. 12 | 13 | Notation | Expression | Term 14 | ---------|---------------------|----- 15 | (l, u) | `l < N and N < u` | Open 16 | [l, u) | `l <= N and N < u` | Half-open 17 | (l, u] | `l < N and N <= u` | Half-open 18 | [l, u] | `l <= N and N <= u` | Closed 19 | 20 | For example, the `math.random` function returns a random number within the 21 | interval [0, 1). That is, the result will be between 0 and 1, and may be 0, but 22 | will never be 1. 23 | 24 | ## Constraints 25 | A type may also be described as having a "constrained", "clamped", or "enforced" 26 | interval. This indicates how values outside the interval are handled. 27 | 28 | To illustrate each kind of constraint, imagine a "Lerp" function that receives 29 | the two inputs *x* and *y*, as well as an *alpha* parameter. The function 30 | returns a number that is the linear interpolation of *x* to *y*, according to 31 | *alpha*. 32 | 33 | Lerp(x: number, y: number, alpha: number): number 34 | 35 | ### Unconstrained 36 | An **unconstrained interval** indicates that the effective values of the number 37 | lie between the specified interval, but values outside the interval may or may 38 | not affect the result. 39 | 40 | Consider the following definition of the Lerp function: 41 | 42 | function Lerp(x, y, alpha) 43 | return (1 - alpha) * x + alpha * y 44 | end 45 | 46 | In this definition, *alpha* has the unconstrained interval of [0, 1]. A value 47 | between the interval produces a result between *x* and *y* as expected. However, 48 | a value outside the interval is still valid, and produces an extrapolated 49 | result. 50 | 51 | ### Clamped 52 | A **clamped interval** indicates that number is constrained to always lie within 53 | the interval. Values less than the lower bound are set to the lower bound, and 54 | values greater than the upper bound are set to the upper bound. 55 | 56 | A Lerp function with the **alpha** parameter having a clamped interval of [0, 1] 57 | might look like this: 58 | 59 | function Lerp(x, y, alpha) 60 | if alpha < 0 then 61 | alpha = 0 62 | elseif alpha > 1 then 63 | alpha = 1 64 | end 65 | return (1 - alpha) * x + alpha * y 66 | end 67 | 68 | Certain APIs, such as properties, may allow any value, but produce a result that 69 | is clamped. These are indicated as having an **effective clamped interval**. 70 | 71 | For example, the [BasePart.Transparency](class:BasePart/Transparency) property 72 | has an effective clamped interval of [0, 1]. The property can hold any value, 73 | but the actual rendered transparency of the BasePart clamps the value between 0 74 | and 1. This could be compared to [Camera.FieldOfView](class:Camera/FieldOfView), 75 | where the value itself is clamped. 76 | 77 | ### Enforced 78 | An **enforced interval** indicates that a value outside the interval results in 79 | an error. 80 | 81 | A Lerp function with the *alpha* parameter having an enforced interval of [0, 1] 82 | might look like this: 83 | 84 | function Lerp(x, y, alpha) 85 | if alpha < 0 or alpha > 1 then 86 | error("alpha is out of bounds", 2) 87 | end 88 | return (1 - alpha) * x + alpha * y 89 | end 90 | --------------------------------------------------------------------------------