From 19bfb41a0a2bc718406db5b9fdd372e41be3f73e Mon Sep 17 00:00:00 2001 From: NullBite Date: Thu, 19 Oct 2023 16:51:54 -0400 Subject: [PATCH] Fix nil index error in purr sound function --- script.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.lua b/script.lua index c2716a9..e1c37e8 100644 --- a/script.lua +++ b/script.lua @@ -397,7 +397,7 @@ do function purr(state) if state and not purr_sound then purr_sound=sound_settings(sounds["entity.cat.purr"]):loop(true):play() - elseif not state then + elseif not state and purr_sound then purr_sound:stop() purr_sound=nil end