-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Start Documenting Roblox's Standard Scripts #1453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
karl-police
wants to merge
34
commits into
Roblox:main
Choose a base branch
from
karl-police:roblox-scripts-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
327a319
Create PlayerModule.md
karl-police 95e5051
Rename PlayerModule.md to PlayerModule.md
karl-police 4cb381e
Create index.md
karl-police a0fd0fa
Rename PlayerModule.md to playermodule.md
karl-police b8bb6a9
Update and rename content/en-us/roblox-scripts/playermodule.md to con…
karl-police 9ccefb0
Update guides.yaml
karl-police d44e86e
Create placeholder.png
karl-police 1e40975
Delete content/en-us/assets/roblox-scripts/placeholder.png
karl-police 176b607
Update .gitattributes
karl-police 290d4b8
Add files via upload
karl-police a0908a0
Update index.md
karl-police c0b83f4
Update index.md
karl-police b6075ff
Update index.md
karl-police de54506
Add files via upload
karl-police 35246ab
Rename starterplayer_scripts.png to starterplayerscripts.png
karl-police aa42c4d
Add files via upload
karl-police a41bb68
Update index.md
karl-police c975cc4
Create CameraModule.md
karl-police b2fbdaa
Update CameraModule.md
karl-police db048cd
Update .gitattributes
karl-police beee4c7
Update CameraModule.md
karl-police 09540f4
Update index.md
karl-police fc0a4b8
Update index.md
karl-police e860dbf
Update CameraModule.md
karl-police 887df05
Update CameraModule.md
karl-police de1f38f
Update CameraModule.md
karl-police 6fbdfa4
Update index.md
karl-police a7d1c84
Update index.md
karl-police d7b050b
Update CameraModule.md
karl-police 6857223
Update CameraModule.md
karl-police dec4db1
Merge branch 'main' into roblox-scripts-docs
karl-police 1132069
Merge branch 'main' into roblox-scripts-docs
karl-police ca6badb
Merge branch 'main' into roblox-scripts-docs
karl-police a2fe40a
Merge branch 'main' into roblox-scripts-docs
karl-police File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| title: CameraModule | ||
| description: Overview about the CameraModule | ||
| --- | ||
|
|
||
| This ModuleScript implements a singleton class to manage the selection, activation, and deactivation of the current camera controller, character occlusion controller, and transparency controller. | ||
| This script binds to RenderStepped at Camera priority and calls the Update() methods on the active controller instances. | ||
|
|
||
| The camera controller ModuleScripts implement classes which are instantiated and activated as-needed, | ||
| they are no longer all instantiated up front as they were in the previous generation of PlayerScripts. | ||
|
|
||
|
|
||
| ## cameraRenderUpdate | ||
|
|
||
| ``cameraRenderUpdate`` is the RenderStep name used and bound with by the ``CameraModule`` | ||
| with the priority ``Enum.RenderPriority.Camera.Value``, through Class.RunService:BindToRenderStep()|:BindToRenderStep(). | ||
|
|
||
| For custom camera or other behavior, it is recommended to keep the priority in mind. The MicroProfiler can be used to debug which render steps are running in which order. | ||
|
|
||
| The order is important. For instance, if the ``CameraModule`` changes the ``Datatype.CFrame`` of the camera, | ||
| you want to ensure that anything that's meant to change the ``Datatype.CFrame`` again runs first, before reading the ``Datatype.CFrame``, if you're expecting a different your custom modified values. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| title: Standard PlayerModule | ||
| description: Overview of the PlayerModule. | ||
| --- | ||
|
|
||
| The ``PlayerModule`` is initialized by ``PlayerScriptsLoader``. | ||
| ``PlayerScriptsLoader`` is a script which requires and instantiates the ``PlayerModule`` singleton. | ||
|
|
||
| ``PlayerModule`` comes with two further modules, ``CameraModule`` and ``ControlModule``. | ||
|
|
||
|
|
||
karl-police marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ## PlayerModule | ||
|
|
||
| This module requires and instantiates the camera and control modules, and provides getters for developers to access methods on these singletons without having to modify Roblox-supplied scripts. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| title: Roblox Standard Scripts | ||
| description: Overview of Roblox Standard Scripts | ||
| --- | ||
|
|
||
| By default, Roblox creates default scripts that provide behavior for things such as the Camera and Character Controls. | ||
|
|
||
| <figure> | ||
| <img src="../assets/roblox-scripts/starterplayerscripts.png" width="200" alt="Showcase of some standard Roblox Scripts." /> | ||
| </figure> | ||
|
|
||
|
|
||
karl-police marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| By starting a playtest <kbd>F5</kbd>, you can find the inserted scripts and copy them through the Explorer, and then stop the playtest and paste the scripts in, in order to optionally modify them, if preferred. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.