Skip to content

Commit 5f0acfe

Browse files
authored
chest-destroy-2 (#1261)
## Changes Updated past pr changes to finished script. ## Checks By submitting your pull request for review, you agree to the following: - [X] This contribution was created in whole or in part by me, and I have the right to submit it under the terms of this repository's open source licenses. - [X] I understand and agree that this contribution and a record of it are public, maintained indefinitely, and may be redistributed under the terms of this repository's open source licenses. - [X] To the best of my knowledge, all proposed changes are accurate.
1 parent a21b3dc commit 5f0acfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/en-us/tutorials/fundamentals/coding-6/create-with-module-scripts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ function TreasureManager.openChest(chestPart, whichCharacter)
433433
local playerTreasure = getPlayerTreasure(whichCharacter)
434434
playerKeys.Value = playerKeys.Value - chestPickCost
435435
playerTreasure.Value = playerTreasure.Value + chestReward
436-
chestPart:Destroy()
436+
chestPart.Parent:Destroy()
437437
end
438438

439439
function TreasureManager.canOpenChest(whichCharacter)

0 commit comments

Comments
 (0)