Skip to content

Commit 0df2791

Browse files
authored
Add conditional check for BackpackScript in button handler
Signed-off-by: Ryan Luu <ryan.luu@ryanluu.dev>
1 parent 20fd3d2 commit 0df2791

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/api-reference.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ local Purse = require(ReplicatedStorage.Purse)
1414
local button = script.Parent
1515

1616
local function onButtonActivated()
17-
Purse.OpenClose()
17+
if BackpackScript.OpenClose then
18+
BackpackScript.OpenClose()
19+
end
1820
end
1921

2022
button.Activated:Connect(onButtonActivated)

0 commit comments

Comments
 (0)