Skip to content

Commit f324f9e

Browse files
authored
chest-destroy-2
1 parent a21b3dc commit f324f9e

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)