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)