SoundUtils.applyPropertiesFromId sets SoundId value twice if given a table.

Open Beginner friendly
#860 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
lua
Domain
game-dev

Research direction

Find SoundUtils.applyPropertiesFromId and trace the table handling described in the issue. Check the related tests or examples for SoundUtils.playFromId and LoopedSoundPlayer, then reproduce with a numeric SoundId in Roblox Studio. Done when the converted asset ID is the value assigned and the error no longer occurs.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
If SoundUtils.applyPropertiesFromId is given a table, it converts the table's SoundId value to a rbxassetid and sets the Sound's SoundId property to that, then sets it again using the original, unconverted value. If the original value was a number, this results in an error.

To Reproduce
Steps to reproduce the behavior:

  1. Create a script that creates and plays sound with SoundUtils, passing a table as an argument. Make sure the table's SoundId value is a number. SoundUtils.playFromId and LoopedSoundPlayer both work for this.
  2. Test in Studio
  3. See error in output and Sound instance with a number in the SoundId property.

Expected behavior
The SoundId should use the converted value.

Dominant language
Lua
Stars
632
Forks
148
Avg merge
15h 41m
Merged PRs (30d)
13

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Quenty/NevermoreEngine

All issues in Quenty/NevermoreEngine

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.