Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisRBX authored Jan 8, 2025
2 parents cd33b72 + e697162 commit 18aa8a7
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 49 deletions.
2 changes: 2 additions & 0 deletions content/en-us/cloud-services/memory-stores/hash-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ After you get a hash map, call any of the following functions to read or write d
</tbody>
</table>

For in-depth documentation about each function, see `Class.MemoryStoreHashMap`.

<Alert severity="warning">
All functions accessing data structures in memory stores are asynchronous network calls that might occasionally fail. You should wrap these calls in `Global.LuaGlobals.pcall()` to catch and handle errors, as shown in the code samples.
</Alert>
Expand Down
8 changes: 4 additions & 4 deletions content/en-us/creator-programs/rdc.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Roblox Developers Conference
description: RDC is an invite-only, hybrid (in-person and online) event that brings together Roblox developers, brands, and creators from around the world.
description: RDC is an invite-only, hybrid (in-person and online) event that brings together Roblox developers, brands, and creators worldwide.
---

RDC is an invite-only, hybrid (in-person and online) event that brings together Roblox developers, brands, and creators from around the world. There will be networking opportunities, in-depth breakout sessions, product demonstrations, and office hours—all designed to empower your success and showcase the future of Roblox.
RDC is an invite-only, hybrid (in-person and online) event that brings together Roblox developers, brands, and creators worldwide. There will be networking opportunities, in-depth breakout sessions, product demonstrations, and office hours—all designed to empower your success and showcase the future of Roblox.

<figure>
<Chip
Expand All @@ -13,6 +13,6 @@ RDC is an invite-only, hybrid (in-person and online) event that brings together
variant="filled"/>
</figure><br />

Creators will receive invites to the annual Roblox Developer Conference. These invites can be to come in person or to watch virtually. Keep an eye on the DevForum for updates regarding the conference each year. We announce "Save the Date" and when registration opens.
Creators will receive invites to the annual Roblox Developer Conference. These invites can be for in-person attendance or for virtual viewing. Keep an eye on the DevForum for updates regarding the conference each year. We announce "Save the Date" and when registration opens.

For some examples of Roblox Developer Conference keynotes, talks, and Q&A sessions, see the [RDC 2023 YouTube playlist](https://www.youtube.com/playlist?list=PLuEQ5BB-Z1PK3EcpypEHHMlc2lknQCJyP).
For some examples of Roblox Developer Conference keynotes, talks, and Q&A sessions, see the [RDC 2024 YouTube playlist](https://www.youtube.com/playlist?list=PLuEQ5BB-Z1PJi8RJ7Kuc0JhcT0ubgaL43).
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ local function startTimer()

while myTimer:isRunning() do
-- Adding +1 makes sure the timer display ends at 1 instead of 0.
timeLeft.Value = (math.floor(myTimer:getTimeLeft() + 1))
timeLeft.Value = (myTimer:getTimeLeft() + 1) // 1
-- By not setting the time for wait, it offers more accurate looping
task.wait()
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Remember that module scripts are used to centralize similar code. Since the time
```lua
while myTimer:isRunning() do
-- Adding +1 makes sure the timer display ends at 1 instead of 0.
timeLeft.Value = (math.floor(myTimer:getTimeLeft() + 1))
timeLeft.Value = (myTimer:getTimeLeft() + 1) // 1
-- By not setting the time for wait, it offers more accurate looping
task.wait()
end
Expand All @@ -378,7 +378,7 @@ Remember that module scripts are used to centralize similar code. Since the time

while myTimer:isRunning() do
-- Adding +1 makes sure the timer display ends at 1 instead of 0.
timeLeft.Value = (math.floor(myTimer:getTimeLeft() + 1))
timeLeft.Value = (myTimer:getTimeLeft() + 1) // 1
-- By not setting the time for wait, it offers more accurate looping
task.wait()
end
Expand Down Expand Up @@ -492,7 +492,7 @@ local function startTimer()

while myTimer:isRunning() do
-- Adding +1 makes sure the timer display ends at 1 instead of 0.
timeLeft.Value = (math.floor(myTimer:getTimeLeft() + 1))
timeLeft.Value = (myTimer:getTimeLeft() + 1) // 1
-- By not setting the time for wait, it offers more accurate looping
task.wait()
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ local function startTimer()

while myTimer:isRunning() do
-- Adding +1 makes sure the timer display ends at 1 instead of 0.
timeLeft.Value = (math.floor(myTimer:getTimeLeft() + 1))
timeLeft.Value = (myTimer:getTimeLeft() + 1) // 1
-- By not setting the time for wait, it offers more accurate looping
task.wait()
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Share animations with friends and fellow developers by exporting and importing t

<Alert severity="info">
<AlertTitle>Rules in Sharing Animations</AlertTitle>
When sharing animations, keep in mind that an Asset ID can only used between the group or individual that owns the animation.
When sharing animations, keep in mind that an asset ID can only be used between the group or individual that owns the animation.
</Alert>

**Exporting Animations**
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/luau/metatables.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ For this one we will be using the `__index` metamethod just to make it simple:
```lua
local function mathProblem(num)
for i = 1, 20 do
num = math.floor(num * 10 + 65)
num = (num * 10 + 65) // 1
end
for i = 1, 10 do
num += i - 1
Expand Down
4 changes: 3 additions & 1 deletion content/en-us/production/monetization/developer-products.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ You can also combine functions inside a `Class.LocalScript|LocalScript`. For exa

```lua
local MarketplaceService = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local Players = game:GetService("Players")

local player = Players.LocalPlayer
local button = script.Parent

-- Replace the placeholder ID with your developer product ID
Expand Down
6 changes: 4 additions & 2 deletions content/en-us/reference/engine/classes/Backpack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ description: |
The Backpack can be accessed from both the client and the server.
```lua
local Players = game:GetService("Players")
-- Accessing Backpack from a Server Script:
game.Players.PlayerName.Backpack
local backpack = Players.PlayerName.Backpack
-- Accessing Backpack from a LocalScript:
game.Players.LocalPlayer.Backpack
local backpack = Players.LocalPlayer.Backpack
```
code_samples:
- Backpack-Give-Tool
Expand Down
14 changes: 10 additions & 4 deletions content/en-us/reference/engine/classes/CollectionService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ methods:
signal created by `Class.CollectionService:GetInstanceAddedSignal()` with
the given tag.
**Warning:** When tagging an instance, it is common that some resources
are used to give the tag its functionality, e.g. event connections or
tables. To prevent memory leaks, it is a good idea to clean these up
(disconnect, set to nil, etc) when no longer needed for a tag. Do this
##### Warnings
- An instance's tags that were added client-side will be dropped if the server
later adds or removes a tag on that instance because the server replicates all
tags together and overwrites previous tags.
- When tagging an instance, it is common that some resources
are used to give the tag its functionality, for example event connections or
tables. To prevent memory leaks, it's a good idea to clean these up
(disconnect, set to `nil`, etc.) when no longer needed for a tag. Do this
when calling `Class.CollectionService:RemoveTag()`, calling
`Class.Instance:Destroy()` or in a function connected to a signal returned
by `Class.CollectionService:GetInstanceRemovedSignal()`.
Expand Down
7 changes: 5 additions & 2 deletions content/en-us/reference/engine/classes/GuiObject.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1417,11 +1417,14 @@ events:
of the user's mouse relative to a GUI element:
```lua
local Players = game:GetService("Players")
local CustomScrollingFrame = script.Parent
local SubFrame = CustomScrollingFrame:FindFirstChild("SubFrame")
local mouse = game.Players.LocalPlayer:GetMouse()
function getPosition(X, Y)
local mouse = Players.LocalPlayer:GetMouse()
local function getPosition(X, Y)
local gui_X = CustomScrollingFrame.AbsolutePosition.X
local gui_Y = CustomScrollingFrame.AbsolutePosition.Y
Expand Down
8 changes: 7 additions & 1 deletion content/en-us/reference/engine/classes/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,13 @@ methods:
already applied. Successfully adding a tag will fire a signal created by
`Class.CollectionService:GetInstanceAddedSignal()` with the given tag.
Note that when tagging an instance, it's common that some resources are
##### Warnings
- An instance's tags that were added client-side will be dropped if the server
later adds or removes a tag on that instance because the server replicates
all tags together and overwrites previous tags.
- When tagging an instance, it is common that some resources are
used to give the tag its functionality, for example event connections or
tables. To prevent memory leaks, it's a good idea to clean these up
(disconnect, set to `nil`, etc.) when no longer needed for a tag. Do this
Expand Down
4 changes: 3 additions & 1 deletion content/en-us/reference/engine/classes/Object.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ methods:
`Datatype.BrickColor` property:
```lua
local Players = game:GetService("Players")
local function paintFigure(character, color)
-- Iterate over the child objects of the character
for _, child in character:GetChildren() do
Expand All @@ -165,7 +167,7 @@ methods:
end
end
end
paintFigure(game.Players.Player.Character, BrickColor.new("Bright blue"))
paintFigure(Players.Player.Character, BrickColor.new("Bright blue"))
```
Since all classes inherit from `Class.Object`, calling
Expand Down
8 changes: 6 additions & 2 deletions content/en-us/reference/engine/classes/Tool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,11 @@ events:
player clicks while the created tool is equipped.
```lua
local Players = game:GetService("Players")
local tool = Instance.new("Tool")
tool.RequiresHandle = false
tool.Parent = game.Players.LocalPlayer.Backpack
tool.Parent = Players.LocalPlayer.Backpack
function onActivation()
print("Tool activated")
Expand Down Expand Up @@ -423,9 +425,11 @@ events:
player releases their click while the tool is equipped and activated.
```lua
local Players = game:GetService("Players")
local tool = Instance.new("Tool")
tool.RequiresHandle = false
tool.Parent = game.Players.LocalPlayer.Backpack
tool.Parent = Players.LocalPlayer.Backpack
function toolDeactivated()
print("Tool deactivated")
Expand Down
3 changes: 2 additions & 1 deletion content/en-us/reference/engine/classes/Translator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,11 @@ methods:
text as the second argument:
```lua
local Players = game:GetService("Players")
local LocalizationService = game:GetService("LocalizationService")
local success, translator = pcall(function()
return LocalizationService:GetTranslatorForPlayerAsync(game.Players.LocalPlayer)
return LocalizationService:GetTranslatorForPlayerAsync(Players.LocalPlayer)
end)
if success then
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/reference/engine/datatypes/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ constructors:
summary: |
Class name of the new instance to create.
- name: parent
type: Instance
type: Instance?
default:
summary: |
Optional object to parent the new instance to. Not recommended for performance reasons (see description above).
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/reference/engine/globals/LuaGlobals.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ functions:
position information to the message.
parameters:
- name: message
type: string
type: Variant
default:
summary: |
The error message to display.
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/reference/engine/libraries/bit32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ functions:
For positive displacements, the following equality holds:
```lua
assert(bit32.rshift(b, disp) == math.floor(b % 2^32 / 2^disp))
assert(bit32.rshift(b, disp) == (b % 2^32 / 2^disp) // 1)
```
This shift operation is what is called logical shift.
Expand Down
6 changes: 1 addition & 5 deletions content/en-us/sound/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,7 @@ sound:Play()
-- Start checking if emitter should be enabled
RunService.Heartbeat:Connect(function()
-- Enable the emitter within a time range of the audio; otherwise disable it
if sound.TimePosition >= 5 and sound.TimePosition < 20 then
emitter.Enabled = true
else
emitter.Enabled = false
end
emitter.Enabled = sound.TimePosition >= 5 and sound.TimePosition < 20
end)
```

Expand Down
13 changes: 2 additions & 11 deletions content/en-us/tutorials/fundamentals/coding-5/intro-to-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,7 @@ Use the array size to check when it's time to cycle back to the first piece of d
local dialogue = dialogueArray[dialogueIndex]
Chat:Chat(head, dialogue)

if dialogueIndex == #dialogueArray then
dialogueIndex = 1
else
dialogueIndex += 1
end
dialogueIndex = if dialogueIndex == #dialogueArray then 1 else dialogueIndex + 1
end
```

Expand Down Expand Up @@ -239,12 +235,7 @@ This script used an array to create a list of possible dialogue lines for a Non-
local dialogue = dialogueArray[dialogueIndex]
Chat:Chat(head, dialogue)

if dialogueIndex == #dialogueArray then
dialogueIndex = 1

else
dialogueIndex += 1
end
dialogueIndex = if dialogueIndex == #dialogueArray then 1 else dialogueIndex + 1
end

prompt.Triggered:Connect(speak)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ end
RunService.Heartbeat:Connect(function()
-- Solves for the NumberSequence's time (between 0 and 1).
local t = time() / loopDuration
local numberSequenceTime = t - math.floor(t)
local numberSequenceTime = t - (t // 1)

-- Gets the NumberSequence's value at this time.
local brightnessValue = evaluateNumberSequence(brightnessCurve, numberSequenceTime)
Expand Down
8 changes: 4 additions & 4 deletions content/en-us/ui/3D-drag-detectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,14 @@ local function snapToWorldGrid(proposedMotion)
if startPartPosition == nil then
return proposedMotion
end
local snapIncrement = math.floor(SNAP_INCREMENT)
local snapIncrement = SNAP_INCREMENT // 1
if snapIncrement < 1 then
return proposedMotion
end
local newWorldPosition = startPartPosition + proposedMotion.Position
local roundedX = math.floor(newWorldPosition.X / snapIncrement + 0.5) * snapIncrement
local roundedY = math.floor(newWorldPosition.Y / snapIncrement + 0.5) * snapIncrement
local roundedZ = math.floor(newWorldPosition.Z / snapIncrement + 0.5) * snapIncrement
local roundedX = ((newWorldPosition.X / snapIncrement + 0.5) // 1) * snapIncrement
local roundedY = ((newWorldPosition.Y / snapIncrement + 0.5) // 1) * snapIncrement
local roundedZ = ((newWorldPosition.Z / snapIncrement + 0.5) // 1) * snapIncrement
local newRoundedWorldPosition = Vector3.new(roundedX, roundedY, roundedZ)
return proposedMotion.Rotation + (newRoundedWorldPosition - startPartPosition)
end
Expand Down
1 change: 1 addition & 0 deletions tools/checks/utils/allowedHttpLinks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -592,3 +592,4 @@ https://github.com/evaera/roblox-animation-transfer?tab=readme-ov-file
https://github.com/evaera/roblox-animation-transfer
https://support.tipalti.com/Content/Topics/UserGuide/PaymentInformation/PaymentMethodsCoverage/IntroUSD.htm?Highlight=payment%20coverage#USD
https://github.com/Roblox/creator-docs/tree/main/content/en-us/reference/cloud
https://www.youtube.com/playlist?list=PLuEQ5BB-Z1PK3EcpypEHHMlc2lknQCJyP

0 comments on commit 18aa8a7

Please sign in to comment.