From 15a6083540ed41af9e632d2cf7df996087f062bc Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Mon, 14 Mar 2022 08:29:01 +0000 Subject: [PATCH] add local --- mobs/butterfly.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobs/butterfly.lua b/mobs/butterfly.lua index 1ffcab7..826f25d 100644 --- a/mobs/butterfly.lua +++ b/mobs/butterfly.lua @@ -24,7 +24,7 @@ minetest.register_entity("dmobs:butterfly", { collisionbox = {0,0,0,0,0.1,0}, on_activate = function(self) - num = math.random(1,4) + local num = math.random(4) self.object:set_properties({textures = {"dmobs_butterfly"..num..".png",},}) self.object:set_animation({x=1, y=10}, 20, 0)