Skip to content

Commit

Permalink
Merge branch 'main' into new
Browse files Browse the repository at this point in the history
  • Loading branch information
010DevX101 authored Jan 8, 2025
2 parents 1d3a6fd + e697162 commit 89a15c1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
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
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
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

0 comments on commit 89a15c1

Please sign in to comment.