From f324f9ee3db443102da6aa193d56f2b7f9b83693 Mon Sep 17 00:00:00 2001 From: fe1ip <158541244+fe1ip@users.noreply.github.com> Date: Mon, 29 Sep 2025 18:17:53 -0400 Subject: [PATCH] chest-destroy-2 --- .../fundamentals/coding-6/create-with-module-scripts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en-us/tutorials/fundamentals/coding-6/create-with-module-scripts.md b/content/en-us/tutorials/fundamentals/coding-6/create-with-module-scripts.md index 67e101755..f151e19ff 100644 --- a/content/en-us/tutorials/fundamentals/coding-6/create-with-module-scripts.md +++ b/content/en-us/tutorials/fundamentals/coding-6/create-with-module-scripts.md @@ -433,7 +433,7 @@ function TreasureManager.openChest(chestPart, whichCharacter) local playerTreasure = getPlayerTreasure(whichCharacter) playerKeys.Value = playerKeys.Value - chestPickCost playerTreasure.Value = playerTreasure.Value + chestReward - chestPart:Destroy() + chestPart.Parent:Destroy() end function TreasureManager.canOpenChest(whichCharacter)