Skip to content

Commit 88202a0

Browse files
update Open Source Docs from Roblox internal teams
1 parent a60fe47 commit 88202a0

File tree

7 files changed

+61
-20
lines changed

7 files changed

+61
-20
lines changed
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

content/en-us/luau/comments.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
2-
title: Comments
2+
title: Luau comments
33
description: Comments are text that the Luau parser ignores at runtime.
44
---
55

66
A **comment** is text that the Luau parser ignores at runtime.
77

8+
<Alert severity="info">
9+
Roblox Studio has a similarly-named [comments](../projects/collaboration.md#studio-comments) feature that is unrelated to code comments in Luau.
10+
</Alert>
11+
812
## Single-line comments
913

1014
You can define single-line comments with a double hyphen (`--`) anywhere outside a string. Single-line comments extend to the end of the line.

content/en-us/projects/collaboration.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,44 @@ To quickly jump to a location in the workspace or to the exact line in a script
165165

166166
<img src="../assets/studio/collaboration/Live-Collaborators-Join.png" width="280" />
167167

168+
## Comments
169+
170+
<Alert severity="success">
171+
The comments feature is rolling out gradually over the next month. All Studio users will have access by 30 May 2025.
172+
</Alert>
173+
174+
Roblox Studio has a comments feature that let you pinpoint an object in the 3D viewport and start a conversation with your collaborators, leave to-do notes, and more. Comments update in real-time, which lets you and your team receive and respond to feedback without disrupting your workflow in Studio.
175+
176+
To use this feature, you must have [added collaborators](#manage-collaborators) to your experience.
177+
178+
### Create comments
179+
180+
To create a comment, click the **Comment** button in the upper-right corner of Studio (keyboard shortcut <kbd>C</kbd>).
181+
182+
<img src="../assets/studio/comments/annotations-button.png" alt="Button for comments in the upper-right." width="400" />
183+
184+
In the viewport, note how your cursor turns blue. Click on any object that inherits from `Class.BasePart` (most do, including terrain), type your comment, and click **Submit**.
185+
186+
<img src="../assets/studio/comments/annotations-blue.png" alt="Blue cursor in the viewport." width="300" />
187+
188+
To tag a collaborator in your comment, use the `@username` syntax. Collaborators can then check the [Comments window](#manage-comments) and filter for comments that mention them.
189+
190+
<img src="../assets/studio/comments/annotations-tag.png" alt="Creating a comment in the viewport." width="700" />
191+
192+
- In a user-owned experience, any user with play or edit permissions is available in the tagging dropdown.
193+
- In a group-owned experience, any user within the group is available in the tagging dropdown.
194+
195+
### Manage comments
196+
197+
The **Comments** window shows a list of all comments, with the most-recent at the top. To open the window, switch to the **View** tab and click the **Comments** button.
198+
199+
<img src="../assets/studio/comments/annotations-window.png" alt="List of comments in the window." width="400" />
200+
201+
- Single-click on a comment to show the full conversation.
202+
- Double-click on a comment to zoom in on it in the viewport.
203+
- Use the **&ctdot;** menu in the upper-right corner to show resolved comments, filter for only the comments that you've been tagged in, or hide comments in the viewport.
204+
- Resolve comments as you and your team address them. After you resolve a comment, it disappears from both the viewport and the main list, but it isn't completely gone; you can always unresolve it later.
205+
168206
## Collaborative scripting
169207

170208
In a collaborative session, you can code together in real-time through [live scripting](#live-scripting), or you can [draft](#drafts-mode) scripts in a more focused environment before committing them to a collaborator‑shared repository.

content/en-us/reference/engine/classes/Players.yaml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -386,29 +386,16 @@ methods:
386386
they are in-game.
387387
description: |
388388
This function searches each `Class.Player` in `Class.Players` for one
389-
whose `Class.Player.UserId` matches the given UserId. If such a player
390-
does not exist, it simply returns `nil`. It is equivalent to the following
391-
function:
392-
393-
```lua
394-
local Players = game:GetService("Players")
395-
local function getPlayerByUserId(userId)
396-
for _, player in Players:GetPlayers() do
397-
if player.UserId == userId then
398-
return player
399-
end
400-
end
401-
end
402-
```
389+
whose `Class.Player.UserId` matches the given `userId`. If such a player
390+
does not exist, it returns `nil`.
403391
404392
This method is useful in finding the purchaser of a developer product
405-
using `Class.MarketplaceService.ProcessReceipt`, which provides a table
406-
that includes the purchaser's UserId and not a reference to the Player
407-
object itself. Most games will require a reference to the player in order
408-
to grant products.
393+
using `Class.MarketplaceService.ProcessReceipt` which provides a table
394+
that includes the purchaser's `Class.Player.UserId|UserId` and not a
395+
reference to the `Class.Player` object itself. Most experiences will
396+
require a reference to the player in order to grant products.
409397
code_samples:
410398
- Players-GetPlayerByUserId1
411-
- ProcessReceipt-Example
412399
parameters:
413400
- name: userId
414401
type: int64

0 commit comments

Comments
 (0)