diff --git a/src/lua_maplib.c b/src/lua_maplib.c
index 218f26e1b76fcb56c205ed39e5a04a1cff414682..f584ce4c36c3b3e5d9634869004f6a1f9c2b01b5 100644
--- a/src/lua_maplib.c
+++ b/src/lua_maplib.c
@@ -1222,11 +1222,13 @@ static int slope_get(lua_State *L)
 		lua_pushfixed(L, slope->zdelta);
 		return 1;
 	case slope_normal: // normal
-		lua_createtable(L, 0, 2);
+		lua_createtable(L, 0, 3);
 		lua_pushfixed(L, slope->normal.x);
 		lua_setfield(L, -2, "x");
 		lua_pushfixed(L, slope->normal.y);
 		lua_setfield(L, -2, "y");
+		lua_pushfixed(L, slope->normal.z);
+		lua_setfield(L, -2, "z");
 		return 1;
 	case slope_zangle: // zangle
 		lua_pushangle(L, slope->zangle);